← All problemsSign in

Swap Shift

CodeChefRating 2714Open on judge ↗

Blobo2 is in his practical exam. The teacher gave him a *permutation* $A$ of $N$ integers. The teacher has allowed Blobo2 to make a certain type of operation on the *permutation*. In one operation, he can: - Apply left shift on the permutation. In other words, he can take the first element of the permutation and move it to the back of the permutation. The teacher has asked Blobo2 to find the *

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