Universal Cup Judging System

Universal Cup

実行時間制限: 1.0 s メモリ制限: 1024 MB 満点: 100
統計

På tavlen står det $n$ forskjellige positive heltall $a_1, \dots, a_n$. Tre spillere gjør trekk i rekkefølgen $123123123\dots$. I et trekk velger spilleren to forskjellige tall $x$ og $y$ på tavlen slik at $|x - y|$ ikke står på tavlen, og skriver $|x - y|$ på tavlen ($x$ og $y$ blir også stående på tavlen). Spilleren som ikke kan gjøre et trekk, taper. Kan spiller $2$ og $3$ samarbeide slik at spiller $1$ taper?

Inndata

Den første linjen inneholder et heltall $n$ ($1 \le n \le 10^5$), antallet heltall på tavlen.

Den andre linjen inneholder $n$ forskjellige heltall $a_1, \dots, a_n$ ($1 \le a_i \le 10^9$): tallene som står på tavlen til å begynne med.

Utdata

Skriv ut YES hvis spiller $2$ og $3$ kan samarbeide og tvinge spiller $1$ til å tape, eller NO ellers.

Eksempler

Inndata 1

3
1 2 3

Utdata 1

YES

Inndata 2

3
1 4 3

Utdata 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.