結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-25 00:05:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 5,000 ms |
| コード長 | 328 bytes |
| コンパイル時間 | 554 ms |
| コンパイル使用メモリ | 63,104 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 08:39:36 |
| 合計ジャッジ時間 | 1,627 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int odd = 0, not_odd = 0;
for(int i = 0; i < N; i++){
int position;
cin >> position;
if(position % 2){
not_odd++;
}else{
odd++;
}
}
cout << abs(odd - not_odd) << endl;
}