20 lines
393 B
C++
20 lines
393 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int n;
|
|
cin >> n;
|
|
|
|
int res = 0; // 起始值是0,因为任何数与0进行异或都它本身
|
|
while (n--) {
|
|
int x;
|
|
cin >> x;
|
|
res ^= x;
|
|
}
|
|
if (res)
|
|
puts("Yes"); // 异或值非零,必胜
|
|
else
|
|
puts("No"); // 异或值是零,必败
|
|
return 0;
|
|
} |