← All problemsSign in

Sussy Perms

CodeChefRating 3504Open on judge ↗

*After getting lost in Hollywood, ibti decided to give you yet another problem related to permutations.* Consider a permutation $P$ of length $2\cdot N$. An array $A$ of size $N$ is generated using the permutation $P$, such that the $i^{th}$ element of the array is a **pair** having value, $A_i = (P_i \bmod N, P_{(i+N)} \bmod N)$. The permutation $P$ (of length $2\cdot N$) is called $N$-beauti

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