No.8066 Erythritol
レベル :
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 7
作問者 :
hirakich1000000007
/ テスター :
butsurizuki
タグ : / 解いたユーザー数 7
作問者 :
butsurizuki
問題文最終更新日: 2020-09-26 23:18:43
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder April Fool Contest 2020
(順位表)
の他の問題:
A Word
O weak one, what is thy name?
Problem Statement
Twin sisters Yes and No have decided to play the following game.
- $K$ cells are arranged in a horizontal row. Of these, $N$ cells initially have a sushi plate on them.
- Starting with Yes, they alternately perform one of the following $2$ types of operations.
- Choose an empty cell that is not adjacent to any empty cell, and place a sushi plate on that cell.
- Choose $3$ consecutive empty cells, and place sashimi plates on $2$ adjacent cells among them.
- The player who first becomes unable to perform an operation loses.
You are given the number of cells $K$ and the cells $A_1 \sim A_N$ that initially have a sushi plate on them. Output which player wins when both players play optimally.
Input
$N$ $K$ $A_1$ $A_2$ $\vdots$ $A_N$
- All inputs are integers.
- $1 \leq N \leq 2 \times 10^5$
- $1 \leq K \leq 10^{18}$
- $1 \leq A_1 < A_2 < \cdots < A_N \leq K$
Output
When both players play optimally, output Yes if Yes wins, and No if No wins.
Sample
Sample 1
Input
1 11 7
Output
Yes
The cells at the start of the game can be illustrated as OOOOOOXOOOO.
Sample 2
Input
1 3 3
Output
No
Note that the area outside the cells is not treated as empty cells.
Sample 3
Input
2 92 11 42
Output
No
Sample 4
Input
33 816762091414933400 3 80190113194613840 80190113194631358 170431446477803615 175430480184464795 175430480184490213 175430480184490223 175430480184594808 175430480184669853 175430480184674416 239870041313717120 239870041313757703 239870041313757727 288568150674875279 288568150674975234 324981923819177490 324981923819215658 421881114434325771 486414037760198669 486414037760269855 486414037760328295 486414037760350960 486414037760390298 486414037760407427 575509738247849149 575509738247869620 575509738247964239 679060282458002903 791492564081815574 799102819772097752 799102819772097753 799102819772173722 816762091414905966
Output
No
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。