HUST Online Judge WebBoard
Problem 1414 >> 666
20234350126 @ 2023-12-10 20:16:47
[ Quote ] [ Edit ] [ Delete ] 1#
#include<iostream>
#include<vector>
using namespace std;
int main() {
int n, D;
cin >> n;
vector<long long> a, b, c;
vector<int>d;
long long A, B, C;
for (int i = 0; i < n; i++) {
cin >> A >> B >> C;
a.push_back(A);
b.push_back(B);
c.push_back(C);
if (a[i] % 2 == 0) {
D = 0;
}
else if (a[i] % 2 != 0 && b[i] % 2 == 0) {
if (c[i] != 0) {
D = 0;
}
else {
D = 1;
}
}
else {
D = 1;
}
d.push_back(D);
}
int e = 0;
for (int i = 0; i < n; i++) {
e += d[i];
}if (e % 2 == 0) {
cout << "even\n";
}
else cout << "odd\n";
}