1008. Array elements loop right to right ( 20 ) time limit 400 ms.
Memory limit 65536 kb
Code length limit 8000 b
A> ( n 0 ) integer is stored in an array a, where each integer loop is moved to the right ( m> = 0 ), and the data from ( a0a1. An-1 ) is converted to ( an-m. AN-1 ) a1. If you need to consider how many times the program moves data, how to design a move?
input format: each input contains a test case, line 1 to n ( 1 <= n <= 100 ), m> = 0 ); Line 2 enters n integers, separated by spaces separated by spaces.
output format: output loop on one line to the right of the m sequence, separated by spaces, and the end of the sequence can't have extra space. input sample:
1 2 3 4 5 6
5 6 1 2 3 4
using namespace std;