시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 150 | 61 | 37 | 32.743% |
The N (1 <= N <= 50,000) cows, conveniently numbered 1..N, are trying to learn some encryption algorithms. After studying a few examples, they have decided to make one of their own! However, they are not very experienced at this, so their algorithm is very simple:
Each cow i is given a starting number C_i (0 <= C_i < 90,000,000), and then all the cows perform the following process in parallel:
They told Canmuu the moose about it in November; he was quite impressed.
Then one foggy Christmas Eve, Canmuu came to say:
"Your algorithm is too easy to break! You should repeat it T (1 <= T <= 1,414,213,562) times instead."
Obviously, the cows were very frustrated with having to perform so many repetitions of the same boring algorithm, so after many hours of arguing, Canmuu and the cows reached a compromise: You are to calculate the numbers after the encryption is performed!
3 4 1 0 4
26 25 29
The following is a table of the cows' numbers for each turn:
Cows' numbers Turn Cow1 Cow2 Cow3 0 1 0 4 1 4 5 1 2 6 5 9 3 14 15 11 4 26 25 29