| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 1024 MB | 8 | 1 | 1 | 20.000% |
There is an integer $x$, initially zero.
There are $n$ operations. Each operation is one of the following types:
1 a b: Add $a \cdot 2^b$ to $x$ where $a$ is an integer (that can be negative) and $b$ is a non-negative integer.2 k: Write $x$ in binary, and compute the value of the digit corresponding to a weight of $2^k$.It is guaranteed that $x \geq 0$ at any time.
The first line of the input consists of four integers, $n,t_1,t_2,t_3$.
In the following $n$ lines, each line describes an operation.
Two adjacent elements in a line are separated by exactly one space.
For each type 2 k query, output a line with an integer (0 or 1) denoting the answer. There shall be no output for each operation of 1 a b.
For all test cases, $1 \leq t_1 \leq 3, 1 \leq t_2 \leq 4, 1 \leq t_3 \leq 2$.
Explanation of $t_1$
Explanation of $t_2$
Explanation of $t_3$
10 3 1 2 1 100 0 1 2333 0 1 -233 0 2 5 2 7 2 15 1 5 15 2 15 1 -1 12 2 15
0 1 0 1 0