Universal Cup Judging System

Universal Cup

时间限制: 1.0 s 内存限制: 1024 MB 总分: 100
统计

บนกระดานมีจำนวนเต็มบวกที่แตกต่างกัน $n$ จำนวน คือ $a_1, \dots, a_n$ ผู้เล่นสามคนผลัดกันเดินตามลำดับ $123123123\dots$ ในการเดินหนึ่งครั้ง ผู้เล่นจะเลือกตัวเลขสองตัวที่แตกต่างกันคือ $x$ และ $y$ บนกระดาน โดยที่ยังไม่มี $|x - y|$ อยู่บนกระดาน แล้วเขียน $|x - y|$ ลงบนกระดาน ($x$ และ $y$ ก็ยังคงอยู่บนกระดานเช่นเดิม) ผู้เล่นที่ไม่สามารถเดินต่อได้จะเป็นฝ่ายแพ้ ผู้เล่นคนที่ $2$ และผู้เล่นคนที่ $3$ สามารถร่วมมือกันเพื่อให้ผู้เล่นคนที่ $1$ แพ้ได้หรือไม่?

ข้อมูลนำเข้า

บรรทัดแรกประกอบด้วยจำนวนเต็ม $n$ ($1 \le n \le 10^5$) แทนจำนวนของจำนวนเต็มบนกระดาน

บรรทัดที่สองประกอบด้วยจำนวนเต็มที่แตกต่างกัน $n$ จำนวน คือ $a_1, \dots, a_n$ ($1 \le a_i \le 10^9$) แทนตัวเลขที่อยู่บนกระดานตั้งแต่เริ่มต้น

ข้อมูลส่งออก

พิมพ์ YES หากผู้เล่นคนที่ $2$ และ $3$ สามารถร่วมมือกันและบังคับให้ผู้เล่นคนที่ $1$ แพ้ได้ หรือพิมพ์ NO ในกรณีอื่น

ตัวอย่าง

ข้อมูลนำเข้า 1

3
1 2 3

ข้อมูลส่งออก 1

YES

ข้อมูลนำเข้า 2

3
1 4 3

ข้อมูลส่งออก 2

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.