You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
393 B

#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;
}