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

정수 $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.