JOI 2017 interesting problem

Revision en1, by 21August, 2018-08-17 12:44:42

Hi everyone. I am trying to solve some of the problems from JOI. I found a very interesting one but can't understand the solution. Can somebody help me by explaining the 100 points solution. Problem link. Here you can find the solution and the code : Contest page. Thank you very much!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 21August 2018-08-17 12:44:42 457 Initial revision (published)