結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-03-04 21:26:17 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 5,000 ms |
| コード長 | 333 bytes |
| コンパイル時間 | 692 ms |
| コンパイル使用メモリ | 59,388 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-24 06:40:58 |
| 合計ジャッジ時間 | 1,974 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
const int offset = 1e9;
using namespace std;
int main() {
int n, x;
int count[2] = {0};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x;
count[(x + offset) % 2]++;
}
cout << abs(count[0] - count[1]) << endl;
return 0;
}