← All problemsSign in

Gii and His Club

CodeChefRating 2475Open on judge ↗

In some faraway land, there is a man named Gii, who is often considered the coolest person that has ever lived. One Saturday evening, he decided to go to a club on the other side of his town. The town is shaped like a grid with $N$ rows (numbered $1$ through $N$) and $N$ columns (numbered $1$ through $N$), where each cell represents a neighbourhood in the city. Let's denote the cell in row $r$ an

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