hiho week 200 register

Ended

Participants:144

Verdict:Accepted
Score:100 / 100
Submitted:2018-04-30 17:29:41

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,ans1=0,ans2=0;
    cin>>n;
    int x;
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&x);
        if(x%2==1) ans1++;
        else ans2++;
    }
    cout<<abs(ans1-ans2)<<endl;
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX