| HUSTPC 2022 |
|---|
| Finished |
Walk_alone has a sequence $$$a$$$ of length $$$n$$$. He can do the following operations for arbitrary times (possibly zero):
Note that Walk_alone can select different $$$y$$$ in different operations.
Now he wants to know if he can change all numbers in the sequence to $$$0$$$.
The first line contains a integers $$$n\ (1 \leq n \leq 10^5)$$$, the length of sequence $$$a$$$.
The next line contains $$$n$$$ integers $$$a_1, a_2, \dots , a_n \ (0 \leq a_i \lt 2^{30})$$$, indicating the elements in $$$a$$$.
Print "$$$\mathtt{YES}$$$" (without quotes) if Walk_alone can change all numbers in the sequence to $$$0$$$, otherwise print "$$$\mathtt{NO}$$$".
5 5 4 2 1 2
YES
5 9 3 5 6 1
NO
| Name |
|---|


