結果

問題 No.216 FAC
ユーザー hanorver
提出日時 2015-11-12 07:50:56
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 462 bytes
コンパイル時間 418 ms
コンパイル使用メモリ 55,320 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-13 14:28:38
合計ジャッジ時間 1,301 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 8
権限があれば一括ダウンロードができます

ソースコード

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