As it turns out, my initial guess was correct and this condition for 2 moves also applies for the general case. And it's easy to notice if length is even you can only affect one of a and a in one move, so it's possible to do in 2 moves iff you can zero either a or a in one move. D: I essentially started this one by guessing again: "This operation looks OP, I think answer But I wondered how many people would write a bruteforce and guess from that instead. C: I actually solved this one legit as I like game theory problems, and think the perspective change idea is simple but cute.B: I copied the idea of the second sample (swap first B with last N), submitted, didn't prove it either.
0 Comments
Leave a Reply. |