시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 256 MB | 13 | 5 | 4 | 50.000% |
There are N students. For 1 <= i <= N, the i-th student scores i points from the exam. These students are divided into groups. In the beginning, each group contains exactly one student. More specifically, initially, the i-th student is in group i.
You have write a program that supports the following operations:
For each test case, there will be L operations.
The first line of the input contains an integer T (T <= 5) denoting the number of test cases. Then T test cases follow in the format described next.
For each test case, you have to output, for every Query operation, the rank of the J-th student.
2 3 5 2 2 1 2 3 2 2 1 1 2 2 2 4 4 1 1 2 1 1 3 1 1 4 2 2
1 2 2 3