| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 1024 MB | 25 | 13 | 12 | 50.000% |
Farmer John and Betsy are playing a game with N (1 ≤ N ≤ 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Betsy to perform P (1≤ P ≤ 100,000) operation. There are two types of operations: moves and counts.
Write a program that can verify the results of the game.
Note that the value for N does not appear in the input file. No move operation will request a move a stack onto itself.
Print the output from each of the count operations in the same order as the input file.
6 M 1 6 C 1 M 2 4 M 2 6 C 3 C 4
1 0 2