Cod sursa(job #1268321)
Utilizator | Data | 20 noiembrie 2014 20:32:51 | |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f ("xerox.in");
ofstream g ("xerox.out");
void rezolva() {
int n, x, y, m, s = 0;
f >> n >> x >> y;
for (int i = 1; i <= n; i++) {
f >> m; s ^= m;
for (int j = 1; j <= m; j++) f >> x >> y;
}
g << (s > 0) << '\n';
}
int main() {
int t;
f >> t;
while (t--) {
rezolva();
}
return 0;
}