Submission #29838525
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
int main() {
int T;
cin >> T;
for (int i = 0; i < T; i++) {
long long a, s;
cin >> a >> s;
long long b = s - a;
if (b >= 0 && (a & b) == a) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | D - AND and SUM |
| User | ecottea |
| Language | C++ (GCC 9.2.1) |
| Score | 400 |
| Code Size | 295 Byte |
| Status | AC |
| Exec Time | 246 ms |
| Memory | 3616 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 400 / 400 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 7 ms | 3556 KiB |
| 001.txt | AC | 207 ms | 3616 KiB |
| 002.txt | AC | 55 ms | 3556 KiB |
| 003.txt | AC | 240 ms | 3496 KiB |
| 004.txt | AC | 246 ms | 3432 KiB |
| 005.txt | AC | 235 ms | 3432 KiB |
| 006.txt | AC | 242 ms | 3524 KiB |
| 007.txt | AC | 242 ms | 3564 KiB |
| 008.txt | AC | 240 ms | 3372 KiB |
| 009.txt | AC | 240 ms | 3560 KiB |
| 010.txt | AC | 217 ms | 3560 KiB |
| example0.txt | AC | 5 ms | 3436 KiB |
| example1.txt | AC | 2 ms | 3428 KiB |