#P7977. 「Stoi2033」世界未末日
「Stoi2033」世界未末日
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
京公网安备 11011102002149号