Yet another Matrix problem
**Please note that this problem contains subtasks.** Given an integer $N$, generate a matrix $A$ of size $N\times N$ such that: - $A_{(i,j)}$ is **distinct** and $A_{(i,j)} \in [1, N^2]$; - The **boundary sum** of all **square** sub-matrices **starting from $A_{(1,1)}$** is **odd**. For example, in a matrix $A$ of size $3\times 3$, the following sums should be odd: - $A_{(1,1)}$; - $A_{
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.
Sign in to chat with the tutor and save your progress.
Sign in to start