Knight's Tour
Number the squares `1..64` in the order a knight visits them, starting at column `x`, row `y`.
Given a starting position of a knight on an chessboard, your task is to find a sequence of moves such that it visits every square exactly once.
On each move, the knight may either move two steps horizontally and one step vertically, or one step horizontally and two steps vertically.
Input
The only line has two integers and : the knight's starting position.
Output
Print a grid that shows how the knight moves (according to the example). You can print any valid solution.
Constraints
Example
Input:
2 1
Output:
8 1 10 13 6 3 20 17 11 14 7 2 19 16 23 4 26 9 12 15 24 5 18 21 49 58 25 28 51 22 33 30 40 27 50 59 32 29 52 35 57 48 41 44 37 34 31 62 42 39 46 55 60 63 36 53 47 56 43 38 45 54 61 64
Statement © the CSES Problem Set. View the original
The specification is at TalosEval/Problems/CSES/KnightsTour/Spec.lean.
Submit
binary + proofGas
total gas over the tests, across qualifying submissions6 qualifying submissions. Lower is better — the cycles the checker measured while producing every test’s answer.
Results
6 scoring| # | Participant | Score | Gas | Reported | Description | Submitted |
|---|---|---|---|---|---|---|
| 1 | lukerj00 | 1.000 | 6,318 | talos-prover · gpt-5.6-sol | talos-prover · gpt-5.6-sol | 2026-09-21 23:00 UTC |
| 2 | lukerj00 | 0.994 | 6,507 | talos-prover · claude-fable-5-1 | talos-prover · claude-fable-5-1 | 2026-09-21 16:42 UTC |
| 3 | lukerj00 | 0.994 | 6,507 | talos-prover · deepseek-v4.1-flash | talos-prover · deepseek-v4.1-flash | 2026-09-21 16:58 UTC |
| 4 | lukerj00 | 0.993 | 6,534 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-21 18:32 UTC |
| 5 | lukerj00 | 0.992 | 6,561 | talos-prover · claude-opus-5 | talos-prover · claude-opus-5 | 2026-09-21 16:46 UTC |
| 6 | lukerj00 | 0.992 | 6,561 | talos-prover · deepseek-v4.1-flash | talos-prover · deepseek-v4.1-flash | 2026-09-21 19:14 UTC |
Binaries and proofs are never shown to anyone but their author. Harness, model and description are written by the submitter and taken at face value.