hiho week 200 register

Ended

Participants:144

Verdict:Accepted
Score:100 / 100
Submitted:2018-05-03 14:52:41

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "iostream"
using namespace std;
int main(){
    int a=0,b=0,n;
    cin>>n;
    while(n--){
        int k;
        cin>>k;
        if(k%2==0)a++;
        else b++;
    }
    cout<<((a-b)>0?a-b:b-a)<<endl;
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX