Cod sursa(job #2859878)
Utilizator | Data | 2 martie 2022 09:17:25 | |
---|---|---|---|
Problema | Jocul NIM | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.33 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("nim.in");
ofstream fout("nim.out");
int main(){
int t, n, x, a;
fin >> t;
while (t--){
fin >> n;
x = 0;
while (n--){
fin >> a;
x ^= a;
}
if (x)
fout << "DA\n";
else
fout << "NU\n";
}
return 0;
}