| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 19 | 16 | 13 | 92.857% |
Suppose you have a non-negative integer $x$. You can do two types of operations:
where \textrm{AND} and \textrm{OR} are the bitwise AND and bitwise OR operations, respectively.
You are given three integers $N$, $A$, and $B$.
If the value of $x$ is initially $N$, is there any sequence of operations that consists of exactly $A$ operations of type 1 and exactly $B$ operations of type 2, such that the final value of $x$ is $N \cdot 2^k$ for some non-negative integer $k$?
Input consists of three integers $N$, $A$, and $B$ ($1 \leq N \leq 10^{18}$, $0 \leq A, B \leq 10^{18}$, $A + B \geq 1$).
Output a single line containing YES if it is possible to make the final value of $x$ equal to $N \cdot 2^k$ where $k$ is a non-negative integer, or NO otherwise.
14 2 2
YES
Explanation of Sample 1: Initially, $x = 14$. You can do the following sequence of operations:
The final value of $x$ is $56 = 14 \cdot 2^2$.
1 0 9
NO