Easy20 pts
Sequence Equation
Permutation p[1..n]. For x=1..n find y where p(p(y))=x. Output y per x.
Input
n, then n ints (p[1]..p[n]).
Output
n lines: y.
Sample
3 2 3 1
Expected
2 3 1
Loading editor…
Output
No output yet. Run your code to see results.