結果
問題 | No.99 ジャンピング駒 |
ユーザー |
|
提出日時 | 2014-12-09 23:27:54 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 42 ms / 5,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 1,574 ms |
コンパイル使用メモリ | 157,776 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 19:00:16 |
合計ジャッジ時間 | 2,114 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;#define REP(i, n) for(int(i)=0;(i)<(n);++(i))const int MOD = 1000000007;int main(){int N;cin >> N;int c0 = 0,c1 = 0;REP(i,N){int X;cin >> X;if(X % 2 == 0) c0++; else c1++;}int res = 0;res = abs(c1-c0);cout << res << endl;return 0;}