Ask AI
Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.
Open Claude Desktopgrid · shortest-path · dynamic-programming
The organizer’s problem statement is available at the official source link.
launcher grid
Find the fewest launcher jumps across the board
Each cell gives maximum rightward and downward jump lengths. The diagram is symbolic, not a sample board.
| start: (R1,D1) | right <= R1 | ... |
| down <= D1 | (Rij,Dij) | ... |
| ... | ... | goal |
- 1
Read each launcher
A cell (i,j) allows a right jump of 1..R[i,j] cells or a down jump of 1..D[i,j] cells. - 2
Move between cells
Treat every legal jump as one edge from the current cell to its landing cell. - 3
Minimize jumps
Find the fewest jumps from the top-left cell to the bottom-right; report unreachable when no route exists.
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|12 lines, 156 charsRun output
Run your code to see output.