結果

問題 No.216 FAC
ユーザー hanorverhanorver
提出日時 2015-11-12 07:50:56
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 462 bytes
コンパイル時間 1,564 ms
コンパイル使用メモリ 50,780 KB
実行使用メモリ 4,480 KB
最終ジャッジ日時 2023-10-11 15:41:37
合計ジャッジ時間 1,754 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
4,348 KB
testcase_12 WA -
testcase_13 AC 1 ms
4,348 KB
testcase_14 WA -
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,352 KB
testcase_18 WA -
testcase_19 AC 2 ms
4,352 KB
testcase_20 WA -
testcase_21 AC 2 ms
4,348 KB
testcase_22 AC 2 ms
4,352 KB
testcase_23 AC 1 ms
4,352 KB
testcase_24 WA -
testcase_25 AC 1 ms
4,348 KB
testcase_26 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

int main(){
    // score[0] = K's score, score[1] = others
    long score[2] ={0};
    int n, s[100];

    std::cin >> n;
    for(int i = 0; i < n; i++) std::cin >> s[i];
    for(int i = 0; i < n; i++){
        int num;
        std::cin >> num;
        if(num == 0) score[0] += s[i];
        else score[1] += s[i];
    }

    if(score[0] >= score[1]) std::cout << "YES" << std::endl;
    else std::cout << "NO" << std::endl;

    return 0;
}
0