Atcoder Beginner Contest 121
A. White Cells
残りは長方形やるだけ。
B. Can you solve this?
各行計算、判定。
C. Energy Drink Collector
価格の低いほうから買えるだけ買う。
D. XOR World
XOR演算の性質に気付ければO(1)。
詳しくはeditorial参照。
ポイントは以下。
同じ要素のXORは0(自身が単位元)。
- x ^ x -> e
偶数nに対してn ^ (n + 1) -> 1