hiho week 200 register

Ended

Participants:144

Verdict:Accepted
Score:100 / 100
Submitted:2018-04-28 21:28:36

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<iostream>
#include<stdio.h>
using namespace std;
int main(int argc, char* argv[]){
    int  N =0;scanf("%d", &N);
    int a=0; int num=N;
    int add_num=0;
    while(N--) {
        scanf("%d", &a);
        if(a%2==1)
            add_num ++;
    }
    printf("%d",abs(num-2*add_num));
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX