시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 23 | 11 | 11 | 47.826% |
You are given a sequence of N numbers and Q queries:
Answer all of the type 1 queries.
The first line contains one integer: N. The second line contains N integers, representing the numbers from the sequence. The third line contains one integer: Q, and the following Q lines contain Q queries, as described in the statement.
The output contains the answers to all of the type 1 queries, one per line.
번호 | 배점 | 제한 |
---|---|---|
1 | 30 | N, Q ≤ 5000 |
2 | 30 | N, Q ≤ 200,000 and there are no type 0 queries |
3 | 40 | N, Q ≤ 200,000 |
7 5 6 3 1 9 8 5 10 1 2 5 0 2 3 2 1 2 4 0 2 7 3 1 2 4 1 4 7 0 5 7 1 1 1 6 1 1 2 1 3 4
6 9 8 5 4 11 4 11 4 13 -1 11 4 -1
The initial sequence is: 5 6 3 1 9 8 5.