Cod sursa(job #3360784)
| Utilizator | Data | 16 iulie 2026 14:32:45 | |
|---|---|---|---|
| Problema | Fructe | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <iostream>
using namespace std ;
int main()
{
int t, b, p, n ;
cin >> t ;
for(int i = 1 ; i <= t ; i++) {
cin >> p >> b ;
n = p + b ;
if(n == 2) {
cout << 1 << endl ;
}
else {
if(b % 2 == 0) {
cout << 0 << endl ;
}
else{
cout << 1 << endl ;
}
}
}
return 0;
}
