結果

問題 No.216 FAC
ユーザー CroweaCrowea
提出日時 2019-01-25 00:17:29
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 1,258 ms
コンパイル使用メモリ 65,876 KB
実行使用メモリ 23,696 KB
最終ジャッジ日時 2023-10-14 09:45:48
合計ジャッジ時間 4,010 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
21,552 KB
testcase_01 AC 53 ms
21,764 KB
testcase_02 AC 51 ms
21,556 KB
testcase_03 AC 52 ms
23,688 KB
testcase_04 AC 52 ms
23,656 KB
testcase_05 AC 52 ms
21,660 KB
testcase_06 AC 54 ms
21,668 KB
testcase_07 AC 53 ms
23,556 KB
testcase_08 AC 53 ms
23,680 KB
testcase_09 AC 54 ms
21,680 KB
testcase_10 AC 57 ms
21,680 KB
testcase_11 AC 56 ms
21,560 KB
testcase_12 AC 55 ms
21,532 KB
testcase_13 AC 53 ms
21,552 KB
testcase_14 AC 54 ms
21,648 KB
testcase_15 AC 52 ms
21,616 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 53 ms
23,696 KB
testcase_19 AC 54 ms
21,560 KB
testcase_20 AC 52 ms
21,640 KB
testcase_21 AC 52 ms
21,748 KB
testcase_22 AC 49 ms
23,620 KB
testcase_23 AC 51 ms
21,764 KB
testcase_24 AC 51 ms
21,588 KB
testcase_25 AC 51 ms
21,552 KB
testcase_26 AC 50 ms
23,592 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 < b.Count(); i++)
        {
            if (b[i] == 0) score += a[i];
        }

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

0