The same permutation

Problem Name:
The same permutation
Site:CodeForces
Links:
Tags:
Problem setters: