ARC124 B - XOR Matching 2 (400)
$ x の候補となるのは$ a_0 \oplus b_0, \cdots , a_0 \oplus b_{n-1} のN個
それぞれの候補について各$ a_iで$ xとXORを取ってその結果の数をカウントする
できた数のカウントが$ bと完全に一致したら良い数
カウントと比較が$ \mathcal{O}(N)でできるので全体で$ \mathcal{O}(N^2)
問題: https://atcoder.jp/contests/arc124/tasks/arc124_b
提出: https://atcoder.jp/contests/arc124/submissions/24538800
#ARC124 #400pt #B #ARC #AtCoder
#O(N^2) #全探索