Cod sursa(job #548535)

Utilizator hiticas_abelhiticasabel hiticas_abel Data 7 martie 2011 15:33:06
Problema Fructe Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream f("fructe.in");
ofstream g("fructe.out");
    int n,p,b,i;
f>>n;
    for(i=1;i<=n;i++)
    {f>>p>>b;
    if((p%2==0&&b%2==0)||(p%2==1&&b%2==0))
    g<<0<<"\n";
    else
    g<<1<<"\n";
        
    }

f.close();
g.close();

}