C. Shinju and the Lost Permutation
Problem - C - Codeforces
C. Shinju and the Lost Permutation
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Shinju loves permutations very much! Today, she has borrowed a permutation pp from Juju to play with.
The ii-th cyclic shift of a permutation pp is a transformation on the permutation such that p=[p1,p2,…,pn]p=[p1,p2,…,pn] will now become p=[pn−i+1,…,pn,p1,p2,…,pn−i]p=[pn−i+1,…,pn,p1,p2,…,pn−i].
L
共有 0 条评论