首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
CF1013B And
】的更多相关文章
CF1013B And
There is an array with n elements a1, a2, ..., an and the number x. In one operation you can select some i (1 ≤ i ≤ n) and replace element ai with ai & x, where & denotes the bitwise and operation. You want the array to have at least two equal ele…
【题解】CF1013B And
题面传送门 解决思路 首先我们可以得出,$ a $ \(\&\) $ x $ \(=\) $ a $ \(\&\) $ x $ \(\&\) $ x $.由此得知,同一个 \(a\) 反复 \(\&\) \(x\) 是没有意义的.所以我们得到,答案仅可能是以下几种情况: \(ans = 0\) ,即有相同的数字,不需要操作. \(ans = 1\) ,即对于某个 \(a_i\) \(\&\) $ x $ \(=\) \(a_j\),其中 $1 \le i,j\le…
题解合集 (update on 11.5)
收录已发布的题解 按发布时间排序. 部分可能与我的其他文章有重复捏 qwq . AtCoder for Chinese: Link ZHOJ: Link 洛谷 \(1\sim 5\) : [题解]CF45I TCMCF+++ [题解]CF1013B And [题解]CF991C Candies [题解]CF356A Knight Tournament [题解]CF1715A Crossmarket \(6\sim 10\) : [题解]CF1215C Swap Letters [题解]CF172…