How does one approach this type of problem through sheer Observation

Revision en1, by 18DaysLeft, 2025-02-28 09:16:14

I was solving this rather simple question 1459B - Move and Turn but i did by making all cases till 9 and adjusting the solution by just guessing and trying if it fits. for even cases it just flashed that it is square of (n/2+1) but for odd case i took more than an hour.

After solving i went to editorial of this contest and they have done it in such a simple way, but i cannot get how one does observe the way they did and came to the solution. Any tips for such would be highly appreciated.

here is my hit and trial solution 308230915 and here is the editoria

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 18DaysLeft 2025-02-28 09:16:14 739 Initial revision (published)