mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-09 16:58:48 +00:00
891. Nim游戏
https://www.acwing.com/problem/content/submission/code_detail/7830890/
This commit is contained in:
parent
8dde1f3e2d
commit
b9cac8afc4
15
AcWing/891/891.cpp
Normal file
15
AcWing/891/891.cpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int n, r, a;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
cin >> n;
|
||||||
|
while (n--) {
|
||||||
|
cin >> a;
|
||||||
|
r ^= a;
|
||||||
|
}
|
||||||
|
cout << (r ? "Yes" : "No") << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user