Universal Cup Judging System

Universal Cup

Limite de temps : 1.0 s Limite de mémoire : 1024 MB Points totaux : 100 Hackable ✓
Statistiques

Дано цілі числа $a, b, c$. Щоразу ви можете виконати одну з таких операцій:

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

де $\oplus$ позначає операцію побітового виключного АБО (XOR).

Ви можете виконати будь-яку кількість операцій, і ви хочете дізнатися, чи можна врешті-решт зробити $a$ рівним $c$.

Вхідні дані

Один тестовий випадок містить декілька наборів даних.

Перший рядок вхідних даних містить кількість наборів даних $T$ ($1 \le T \le 10^3$), що позначає кількість наборів даних у цьому тесті.

Для кожного набору даних дано рядок із трьома цілими числами $a, b, c$ ($0 \le a, c \le 10^{18}, 1 \le b \le 1000$).

Гарантується, що в одному тестовому випадку $\sum b^2 \le 10^6$.

Вихідні дані

Для кожного набору даних, якщо можливо врешті-решт зробити $a$ рівним $c$, виведіть "YES"; інакше виведіть "NO".

Приклади

Вхідні дані 1

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

Вихідні дані 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.