結果

問題 No.216 FAC
ユーザー hamrayhamray
提出日時 2017-11-20 15:47:58
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 540 bytes
コンパイル時間 1,265 ms
コンパイル使用メモリ 158,420 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-26 03:20:38
合計ジャッジ時間 1,921 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int N; cin >> N;
    int num[2][N];
    for(int i = 0; i < 2; i++){
        for(int j=0; j < N; j++){
            cin >> num[i][j];
        }
    }
    int temp = 0, sum = 0;
    for(int i = 0; i<2; i++){
        for(int j=0; j < N; j++){
            if(num[1][j] != 0){
                sum += num[0][j];
            }else{
                temp += num[0][j];
            }
        }
    }
    if(temp >= sum) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}
0