結果
| 問題 | No.99 ジャンピング駒 |
| コンテスト | |
| ユーザー |
machy
|
| 提出日時 | 2015-06-11 20:12:52 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 5,000 ms |
| コード長 | 518 bytes |
| 記録 | |
| コンパイル時間 | 457 ms |
| コンパイル使用メモリ | 92,964 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-28 05:32:15 |
| 合計ジャッジ時間 | 1,219 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <iomanip>
using namespace std;
typedef long long LL;
int main(){
int N;
cin >> N;
int cnt[2] = {0,0};
for(int i = 0; i < N; i++){
int x;
cin >> x;
if(x % 2 == 0){
cnt[0]++;
}else{
cnt[1]++;
}
}
if(cnt[0] > cnt[1]){
cout << cnt[0]-cnt[1] << endl;
}else{
cout << cnt[1]-cnt[0] << endl;
}
return 0;
}
machy