Universal Cup Judging System

Universal Cup

Time Limit: 1.0 s Memory Limit: 1024 MB Total points: 100 Hackable ✓
Statistics

給定整數 $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.