#P5550. Chino的数列
Chino的数列
Description
Chino is given numbers , and two constants . She will repeatedly perform rounds of operations on these numbers. Each round includes the following steps:
-
(swap and ).
-
Shift all numbers forward by one position (the 1st number moves to the -th position).
Chino wants to know what these numbers are after rounds of operations.
Orz yky,dyh,wjk,jjy,cxr,gsy,cpy,zcy,tyz,yy,hz,zhr,ygg.
Input Format
The first line contains four numbers: .
The next line contains numbers, representing .
Output Format
Output one line with numbers, representing .
4 1 2 3
1 2 3 4
1 2 3 4
Hint
For of the testdata, .
For of the testdata, , , .
All numbers fit in long long.
Translated by ChatGPT 5
京公网安备 11011102002149号