結果
| 問題 | No.99 ジャンピング駒 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-13 18:15:03 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 426 bytes |
| 記録 | |
| コンパイル時間 | 3,884 ms |
| コンパイル使用メモリ | 261,328 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 08:51:39 |
| 合計ジャッジ時間 | 4,709 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 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 << min( odd , even ) << endl;
}