Curious Matrix
You are given a prime $p$ and a matrix $M$ with $N$ rows (numbered $1$ through $N$) and $N$ columns (numbered $1$ through $N$). For each row $r$ and column $c$, the cell in row $r$ and column $c$ can either be empty or contain an integer $M_{r, c}$. Initially, all cells are empty. Now you should process $Q$ queries. In each query, you are given integers $x$, $y$ and $v$ and you should do the fo
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