Doors Breaking and Repairing CodeForces - 1102C (思維)
You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.
There are nn doors, the ii-th door initially has durability equal to
During your move you can try to break one of the doors. If you choose door ii and its current durability is bibi then you reduce its durability to max(0,bi−x)max(0,bi−x) (the value xx is given).
During Slavik's move he tries to repair one of the doors. If he chooses door