Cod sursa(job #3234364)
Utilizator | Data | 9 iunie 2024 09:37:16 | |
---|---|---|---|
Problema | Xerox | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <fstream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
int main() {
int n, m, t, x, y, rez = 0;
f >> t;
for(int i = 0; i < t; i++) {
rez = 0;
f >> n >> x >> y;
for (int j = 0; j < n; j++) {
f >> m;
rez ^= m;
while (m--)
f >> x >> y;
}
g << (rez ? 1 : 0) << 'n';
}
return 0;
}