kick start 2019 round C
A post-contest write-up.
Problem link
The main references were Kuang Shen’s livestream solution and the official Analysis.
Wiggle Walk
The easy idea is brute force. Simulate the entire command execution process and mark whether each cell has been visited before.
Time complexity: O(N ^ 2).
Althoug