Cod sursa(job #3288448)
Utilizator | Data | 22 martie 2025 13:00:38 | |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
int t,n,x,a;
int main() {
f>>t;
while(t--) {
int suma=0;
f>>n>>x>>x;
for(int i=1; i<=n; i++) {
f>>x;
suma^=x;
for(int j=1; j<=x; j++) {
f>>a>>a;
}
}
if(suma!=0) {
g<<1;
} else {
g<<0;
}
g<<"\n";
}
f.close();
g.close();
return 0;
}