0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-05 14:38:48 +00:00
OI-codes/Luogu/CF25A/CF25A.cpp

22 lines
410 B
C++
Raw Normal View History

2020-10-22 13:52:13 +00:00
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a[5], t, o;
cin >> n >> a[0] >> a[1] >> a[2];
o = (a[0] % 2 + a[1] % 2 + a[2] % 2) / 2;
for (int i = 0; i < n; i++) {
if (i >= 3) {
cin >> t;
2021-11-19 09:01:13 +00:00
} else {
2020-10-22 13:52:13 +00:00
t = a[i];
}
if (t % 2 != o) {
2021-11-19 09:01:13 +00:00
cout << i + 1 << endl;
2020-10-22 13:52:13 +00:00
return 0;
}
}
return 0;
}