AcWing 3733. 去掉一个元素 Posted on 2021-07-03 Edited on 2024-11-24 In AcWing 12345678910111213141516#include <iostream>using namespace std;const int N = 100;int n;int a[N];int main() { cin >> n; int p = 0, o = 0; for (int i = 0; i < n; ++i) { cin >> a[i]; if (a[i] & 1) ++o; else ++p; } cout << (o & 1 ? o : p) << endl; return 0;}