結果

問題 No.99 ジャンピング駒
ユーザー トミー
提出日時 2024-08-27 00:13:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 350 bytes
コンパイル時間 1,772 ms
コンパイル使用メモリ 169,972 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-08-27 00:13:03
合計ジャッジ時間 2,950 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef int64_t ll;
typedef vector<int64_t> vll;

int main() {
    ll n;
    cin>>n;
    vll x(n);
    for(auto &i:x){
        cin>>i;
    }
    ll result=0;
    for(auto &i:x){
        if(i%2==0){
            result++;
        }else{
            result--;
        }
    }
    cout<<abs(result)<<endl;
}
0