Rio Hacks
CodeChefOpen on judge ↗
Rio is solving a hacking problem to brush up his skills. The problem is as follows: He is given a matrix $M$ and a list $L$ of $k$ positions in the matrix $M_{ij}$. Starting from $L_0$, he must delete the number at $L_i^{th}$ position in the matrix. All the numbers following that number should come **one position back**. In the rear end of the matrix, put $-1$ at the empty position. Rio must
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