← All problemsSign in

Akash and Grid

CodeChefRating 1311Open on judge ↗

Akash is stuck in a $N \times N$ grid, where $N$ is **odd**. The rows of the grid are numbered $1$ to $N$ from top to bottom, and the columns are numbered $1$ to $N$ from left to right. The cell at the intersection of the $i$-th row and $j$-th column will be denoted $(i, j)$. The grid has a unique center cell — $((N+1)/2, (N+1)/2)$. For example, when $N = 5$ the center is cell $(3, 3)$. Akash is

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start