Editorial for COCI '11 Contest 3 #4 Robot
Submitting an official solution before solving the problem yourself is a bannable offence.
We will find a way to quickly keep track of the current sum after each move of the robot.
Assume that robot moved to the right (east) from
Next, we must figure out how to calculate
This solution has a complexity of
Comments