結果

問題 No.99 ジャンピング駒
ユーザー ngtkanangtkana
提出日時 2020-03-05 12:17:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 196 bytes
コンパイル時間 1,626 ms
コンパイル使用メモリ 162,172 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-22 02:15:17
合計ジャッジ時間 2,723 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 45 ms
5,376 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
int main(){
    int n;std::cin>>n;
    int m=0;
    for(int i=0;i<n;i++){
        int x;std::cin>>x;
        m+=x%2;
    }
    std::cout<<n-2*std::min(m,n-m)<<std::endl;
}
0