Cod sursa(job #1845974)

Utilizator cella.florescuCella Florescu cella.florescu Data 12 ianuarie 2017 00:12:36
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.45 kb
#include <fstream>

using namespace std;

int main()
{
    int t, n, m, x, y, xr;
    ifstream fin("xerox.in");
    fin >> t;
    ofstream fout("xerox.out");
    for (t; t > 0; --t) {
      fin >> n >> x >> y;
      xr = 0;
      for (n; n > 0; --n) {
        fin >> m;
        xr ^= m;
        for (m; m > 0; --m)
          fin >> x >> y;
      }
      fout << (xr > 0) << '\n';
    }
    fin.close();
    fout.close();
    return 0;
}