解法:
优先考虑每个对半分,然后讨论余数的情况
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define endl '\n'
int main() {
int t; cin >> t;
int a, b, c;
while (t--) {
cin >> a >> b >> c;
if (a & 1) {
if (b & 1) {
if (c & 1) {
cout << 0 << endl;
}
else {
cout << 1 << endl;
}
}
else {
if (c & 1) {
cout << 0 << endl;
}
else {
cout << 1 << endl;
}
}
}
else {
if (b & 1) {
if (c & 1) {
cout << 1 << endl;
}
else cout << 0 << endl;
}
else {
if (c & 1) {
cout << 1 << endl;
}
else {
cout << 0 << endl;
}
}
}
}
return 0;
}