A - AtCoder Jumper Editorial by rng58_admin


The solution may be hard to notice, but is actually very simple.

For simplicity, consider the indexes of pages in modulo \(N\). From \(x\), add two links to \(2x\) to \(2x+1\).

Then, from \(x\), in \(10\) steps, you can reach \(1024x, 1024x+1, \cdots, 1024x+1023\). Since these \(1024\) numbers contain all numbers in modulo \(N\), this is a correct answer.

posted:
last update: