#3615. AND and SUM
AND and SUM
AND and SUM
题目描述
Solve the following problem for test cases.
Given are non-negative integers $a$ and $s$. Is there a pair of non-negative integers $(x,y)$ that satisfies both of the conditions below?
What is bitwise $\mathrm{AND}$?
The bitwise $\mathrm{AND}$ of integers $A$ and $B$, $A\ \mathrm{AND}\ B$, is defined as follows:
When is written in base two, the digit in the 's place () is if those of and are both , and otherwise.
For example, we have $4\ \mathrm{AND}\ 6 = 4$ (in base two: $100\ \mathrm{AND}\ 110 = 100$).<br/>
输入格式
Input is given from Standard Input. The first line is in the following format:
Then, test cases follow. Each test case is in the following format:
输出格式
Print lines. The -th line should contain if, in the -th test case, there is a pair of non-negative integers that satisfies both of the conditions in the Problem Statement, and otherwise.
2
1 8
4 2
Yes
No
4
201408139683277485 381410962404666524
360288799186493714 788806911317182736
18999951915747344 451273909320288229
962424162689761932 1097438793187620758
No
Yes
Yes
No
提示
All values in input are integers.In the first test case, some pairs such as satisfy the conditions.
In the second test case, no pair of non-negative integers satisfies the conditions.
标签: AtCoder|abc238D
来源
AtCoder|abc238D