Pagini recente » Cod sursa (job #2459619) | Cod sursa (job #1692679) | Rating Taut Radu Alexandru (Sunt_3l3v) | Cod sursa (job #1345740) | Cod sursa (job #1182992)
// pb11procon.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include "fstream"
#include "iostream"
using namespace std;
int NrGroups;
int Groups[100001];
int main()
{
ifstream f("nim.in");
int Nrt;
f>>Nrt;
for(int q = 0 ; q < Nrt ; q ++)
{
f>>NrGroups;
for(int i = 0 ; i < NrGroups ; i ++)
f>>Groups[i];
int x = Groups[0];
for(int i = 1 ; i < NrGroups ; i ++)
x = x ^ Groups[i];
if(x == 0)
cout<<"DA\n";
else
cout<<"NU\n";
}
return 0;
}