← All problemsSign in

Grid Construction (Odd)

CodeChefRating 1840Open on judge ↗

**This is the odd version of the Grid Construction Problem. Both are worth 50 points each.** You are given an **odd** integer $N$. Now your task is to construct a grid $A$ containing $N$ rows and $N$ columns such that : - For every $i,j(1 \le i,j \le N)$ $1 \le A_{i,j} \le N$ have to be satisfied. - For every $x(1 \le x \le N)$, $x$ appears **exactly** $N$ times in $A$. - Let $S_1$ be the sum o

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