Universal Cup Judging System

Universal Cup

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

Тақтада өзара әртүрлі $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$) — бастапқыда тақтада жазылған сандар берілген.

Шығыс деректер

Егер $2$-ші және $3$-ші ойыншылар бірігіп, $1$-ші ойыншыны жеңілуге мәжбүрлей алса, YES деп, әйтпесе 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.