← All problemsSign in

The Drug Deal

Gus is dealing a new batch of drugs with another underworld leader. He has planned a secret code that he will use to communicate with the other party. Given a matrix $A$ with two rows and $N$ columns. The cell in the $i^{th}$ row and $j^{th}$ column of the matrix is denoted by $A_{i,j}$. Define $F(x,i)=(x^2+A_{1,i}\cdot x+A_{2,i})\ \text{mod}\ P$. A matrix with $k$ columns is considered perfect

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