How to solve this problem?

Revision en1, by Electr0, 2021-09-13 08:40:41

Problem link — https://codeforces.com/problemset/problem/1355/D

I was able to prove that if S>=2*n, then Petya can always win (same logic which is given in the tutorial). But I am not able to prove that if S<2*n then Petya will always lose. How to prove that?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Electr0 2021-09-13 08:40:41 294 Initial revision (published)