← All problemsSign in

Min Mod Shuffle

You have $2$ stacks of cards $A$ and $B$. Each stack is of size $N$. Each card in the stacks has an integer written on it. Let the $i^{th}$ card in each stack have integers $A_i$ and $B_i$ written on them respectively. You have to make a new stack of cards $C$, where each card will have the integer $(A_i + B_i)\%N$ written on it. You can shuffle the stack $B$ at most 1 times, and have to find th

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