Pagini recente » Stelele Informaticii 2010, clasele X-XII, Ziua 2 | Profil Ovidiu-Antonio | Istoria paginii utilizator/stefanut | Rating Ioan-Cornel Tamas (Tamasionutz) | Cod sursa (job #1950172)
#include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
ifstream fin( "nim.in" );
ofstream fout( "nim.out" );
int t,i,n,x,ans;
int main()
{
fin>>t;
while( t-- )
{
fin>>n;
for( i = 1 ; i <= n ; i++ )
{
fin>>x;
ans ^= x;
}
if( ans == 0 )
fout<<"DA\n";
else
fout<<"NU\n";
ans = 0;
}
return 0;
}