0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 04:58:48 +00:00

CF25A IQ test

R40310726
This commit is contained in:
Baoshuo Ren 2020-10-22 21:52:13 +08:00 committed by Baoshuo Ren
parent 05dba36899
commit 3ece123c57
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

22
problem/CF25A/CF25A.cpp Normal file
View File

@ -0,0 +1,22 @@
#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;
}
else {
t = a[i];
}
if (t % 2 != o) {
cout << i+1 << endl;
return 0;
}
}
return 0;
}