結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
chakku
|
| 提出日時 | 2015-09-26 02:45:57 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 5,000 ms |
| コード長 | 527 bytes |
| コンパイル時間 | 580 ms |
| コンパイル使用メモリ | 65,888 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 10:32:43 |
| 合計ジャッジ時間 | 1,577 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <queue>
#include <string>
#include <climits>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,x,n) for(int i=x;i<n;i++)
#define ALL(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<":"<<x<<endl
const int INF = INT_MAX / 3;
int main(){
int N; cin >> N;
int even = 0, odd = 0;
int x[10001];
rep(i, N){
int xx; cin >> xx;
if (xx % 2 == 0) even++;
else odd++;
}
cout << abs(even - odd) << endl;
return 0;
}
chakku