結果

問題 No.216 FAC
ユーザー CroweaCrowea
提出日時 2019-01-25 00:22:35
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 592 bytes
コンパイル時間 1,479 ms
コンパイル使用メモリ 67,192 KB
実行使用メモリ 25,628 KB
最終ジャッジ日時 2023-10-14 09:45:53
合計ジャッジ時間 3,833 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
21,720 KB
testcase_01 AC 61 ms
23,576 KB
testcase_02 AC 60 ms
21,664 KB
testcase_03 AC 61 ms
23,556 KB
testcase_04 AC 61 ms
23,640 KB
testcase_05 AC 60 ms
21,520 KB
testcase_06 AC 59 ms
21,572 KB
testcase_07 AC 59 ms
21,492 KB
testcase_08 AC 60 ms
21,680 KB
testcase_09 AC 61 ms
23,580 KB
testcase_10 AC 60 ms
21,520 KB
testcase_11 AC 60 ms
21,528 KB
testcase_12 AC 59 ms
23,628 KB
testcase_13 AC 60 ms
21,692 KB
testcase_14 AC 60 ms
21,604 KB
testcase_15 AC 61 ms
21,672 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 61 ms
25,628 KB
testcase_19 AC 62 ms
21,676 KB
testcase_20 AC 60 ms
21,508 KB
testcase_21 AC 61 ms
19,540 KB
testcase_22 AC 60 ms
21,520 KB
testcase_23 AC 60 ms
21,384 KB
testcase_24 AC 60 ms
23,464 KB
testcase_25 AC 60 ms
21,580 KB
testcase_26 AC 60 ms
21,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        // 入力
        var N = int.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
        var b = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();

        // スコア計算
        int score = 0;
        for (int i=0; i < N; i++)
        {
            if (b[i] == 0) score += a[i];
        }

        // 出力
        Console.WriteLine((score >= a.Max()) ? "YES" : "NO");
    }
}

0