Cod sursa(job #3339857)
| Utilizator | Data | 10 februarie 2026 16:00:46 | |
|---|---|---|---|
| Problema | Jocul NIM | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.3 kb |
#include <fstream>
using namespace std;
ifstream f("nim.in");
ofstream g("nim.out");
int main()
{
int T,N,x,S;
f>>T;while(T--)
{
f>>N;S=0;
while(N--)
{
f>>x;
S^=x;
}
g<<(S!=0?"DA\n":"NU\n");
}
return 0;
}
