| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 (추가 시간 없음) | 1024 MB | 5 | 2 | 2 | 50.000% |
Alice and Bob are going to play a game. The rule of the game is as follows:
Alice's objective is to finish the game as late as possible, while Bob's is as soon as possible.
Initially, there are no monsters. You have to process $Q$ queries of the following types:
Note that the game doesn't happen in reality, and the monsters don't disappear.
Input is given from Standard Input in the following format:
$Q$
Description of the 1-st query
Description of the 2-nd query
$\vdots$
Description of the Q-th query
The description of each query is in one of the following formats:
Type $1$: $1$ $X_i$ $Y_i$
Type $2$: $2$ $K_i$
For each query of the type $2$, print the answer in a line.
6 1 1 4 2 3 1 2 3 2 6 1 2 2 2 6
3 7 8
20 1 1 12 2 12 1 2 15 2 12 2 3 1 12 10 2 27 1 14 6 2 7 2 43 2 22 1 8 7 1 1 11 2 49 1 5 19 2 38 2 8 1 12 14 1 16 1 2 24
12 12 3 42 7 246 25 301 91 8 32
After the $5$-th query, there are $4$ monsters whose HPs are $1$ and $2$ monsters whose HPs are $2$.