#P7977. 「Stoi2033」世界未末日
「Stoi2033」世界未末日
Background
Note: Using submission feedback to extract data is cheating.
Even if the world is about to collapse
Darling, I will never shed a tear
I will not give up that feeling of having loved
Cherishing everything that holds memories of you
Even if the world is about to tilt
Darling, I will never say goodbye
Even if the doomsday threat is even stronger
With love, it is not tiring
—— “The World Has Not Yet Ended”
Problem Description
Vinsta and Stella have piles of stones. The -th pile has stones.
They agree to take turns starting from Vinsta. In each move, they may choose at least pile and at most piles of stones to operate on. For the -th pile, they may choose two real numbers satisfying:
- , where
Then they discard stones from the -th pile, i.e. set . The player who cannot make a move loses. They want to know whether Vinsta has a winning strategy.
Input Format
The first line contains three positive integers , where .
The second line contains positive integers , which represent the initial number of stones in the -th pile.
Output Format
Output one line. If there is a winning strategy, output YES; otherwise output NO.
7 1 13
2 3 4 5 7 10 11
YES
8 1 13
2 3 4 5 7 10 11 13
NO
7 2 100
19 26 8 17 11 45 14
YES
Hint
Constraints
This problem uses bundled testdata.
| Subtask | Score | ||
|---|---|---|---|
For of the data, , and .
Translated by ChatGPT 5