結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-13 18:20:07 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 5,000 ms |
| コード長 | 425 bytes |
| コンパイル時間 | 4,404 ms |
| コンパイル使用メモリ | 261,340 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-17 09:08:35 |
| 合計ジャッジ時間 | 4,892 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
//No.99 ジャンピング駒
#pragma GCC optimize("O3")
#pragma GCC target("avx")
#include <bits/stdc++.h>
#define rep(i ,n) for(int i=0;i<(int)(n);++i)
using namespace std;
signed main(){
int n; cin >>n;
vector<long long> x(n);
rep( i , n ) cin >> x[i];
int odd , even;
odd = even = 0;
rep( i , n ){
if( x[i] & 1) ++odd;
else ++even;
}
cout << abs( odd - even ) << endl;
}