ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1458. War Games

Wow
Posted by Isabelle Lightray *~ 20 Nov 2018 17:14
Very fun and interesting problem. Although, before solving it I wrote a playable version, which was pretty hard to solve by hand (brain).

The problem itself isn't that hard. You don't need any deep mathematical knowledge. Just think about what the move (cross xor) means and find its relation to consequent moves player can make. It's then pretty easy to formulate several theorems that let you write an O(n^2) solution.