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
This is my thinking process for this problem:
First, I looked at the robot's moving process, which consists of movements and rotations. Because the problem is asking about the robot's place on the grid, and rotation is quite hard to control, I tried to get rid of it in my thinking process, by rewriting it as the robot's movement. Then I realized that the key to solve this problem is if in one move, the robot moves north or south, then in the next move the robot must move east or west, and vice versa. So I considered the chain of movement in the north-south direction and the east-west direction independently. Then, I could easily see that we just need to consider all possible chains that exist, and they'll always fit the rotation constraint. Then, this is a simple math problem.
All of my thinking processes were in about 10 seconds, and I might take about 5-10 minutes to implement this problem, but I'm lazy, so well, there you have it =))))
(P/s: Sorry for my bad English skill)
10seconds damn. thanks for the thought process.