Cod sursa(job #3360635)
| Utilizator | Data | 15 iulie 2026 12:28:46 | |
|---|---|---|---|
| Problema | Jocul NIM | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.41 kb |
// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while(t--) {
int n;
cin >> n;
int s = 0;
for(int i = 1; i <= n; i++) {
int x;
cin >> x;
s ^= x;
}
if(s != 0) {
cout << "DA\n";
} else {
cout << "NU\n";
}
}
}
