Cod sursa(job #944083)
Utilizator | Christescu Matei matei_c | Data | 27 aprilie 2013 12:36:26 |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.5 kb |
#include<fstream>
using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int tst ;
bool nim()
{
int n, nx, ny ;
int sumaxor = 0 ;
fin >> n >> nx >> ny ;
while( n-- )
{
int m ;
fin >> m ;
sumaxor ^= m ;
int x, y ;
while( m-- )
fin >> x >> y ;
}
return sumaxor ;
}
int main()
{
fin >> tst ;
while( tst-- )
fout << nim() << "\n" ;
return 0 ;
}