Universal Cup Judging System

Universal Cup

Süre Sınırı: 1.0 s Bellek Sınırı: 1024 MB Toplam puan: 100 Hack'lenebilir ✓
İstatistikler

Cho các số nguyên $a, b, c$, mỗi lần bạn có thể thực hiện một trong các thao tác sau:

  • $a \leftarrow a + b$
  • $a \leftarrow a \oplus b$

trong đó $\oplus$ biểu thị phép toán XOR nhị phân.

Bạn có thể thực hiện số lượng thao tác tùy ý, và bạn muốn biết liệu cuối cùng có thể biến $a$ bằng $c$ hay không.

Dữ liệu vào

Một test đơn lẻ chứa nhiều bộ dữ liệu.

Dòng đầu tiên của dữ liệu vào là số lượng bộ dữ liệu $T$ ($1 \le T \le 10^3$), biểu thị số bộ dữ liệu trong test này.

Đối với mỗi bộ dữ liệu, có một dòng gồm ba số nguyên $a, b, c$ ($0 \le a, c \le 10^{18}, 1 \le b \le 1000$).

Đảm bảo rằng trong một test đơn lẻ, $\sum b^2 \le 10^6$.

Dữ liệu ra

Đối với mỗi bộ dữ liệu, nếu cuối cùng có thể biến $a$ bằng $c$, hãy in ra "YES"; ngược lại, in ra "NO".

Ví dụ

Dữ liệu vào 1

5
1 6 7
7 5 13
8 3 16
7 6 17
2 7 8

Dữ liệu ra 1

YES
NO
YES
YES
NO

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.