Magic Powder(Codeforces 670D1/D2)---(暴力/二分)

NoSuchKey