← All problemsSign in

Magical Plate

As a project for her arithmancy class, Hermoine has designed a magical plate which contains a sequence of N numbers which permutes according to a fixed permutation everyday. We denote the sequence of numbers on the ith day as A[i][1], A[i][2], ... A[i][N]. f[1],f[2]...f[N] is a fixed permutation of (1,2,..N). The sequence A[i+1][1],A[i+1][2],...A[i+1][N] is the result of applying the permutation f

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