Cod sursa(job #2008083)
Utilizator | Data | 5 august 2017 12:03:02 | |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include<fstream>
using namespace std;ifstream f("xerox.in");ofstream g("xerox.out");int n,t,m,x,y;int main(){f>>t;while(t--){f>>n>>y>>y;x=0;for(int i=1;i<=n;i++){f>>m; x=x^m;for(int k=1;k<=m;k++) f>>y>>y;}if(x==0) g<<"0\n";else g<<"1\n";}return 0;}