結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
23,552 KB
testcase_01 AC 61 ms
23,452 KB
testcase_02 AC 60 ms
21,588 KB
testcase_03 AC 60 ms
21,756 KB
testcase_04 AC 61 ms
21,552 KB
testcase_05 AC 63 ms
23,584 KB
testcase_06 AC 62 ms
23,468 KB
testcase_07 AC 62 ms
21,576 KB
testcase_08 AC 60 ms
21,560 KB
testcase_09 AC 60 ms
19,400 KB
testcase_10 AC 59 ms
19,548 KB
testcase_11 AC 61 ms
21,652 KB
testcase_12 AC 60 ms
21,580 KB
testcase_13 AC 61 ms
19,548 KB
testcase_14 AC 59 ms
21,448 KB
testcase_15 AC 60 ms
21,652 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 59 ms
21,528 KB
testcase_19 AC 60 ms
21,524 KB
testcase_20 AC 59 ms
19,532 KB
testcase_21 AC 61 ms
23,544 KB
testcase_22 AC 60 ms
21,532 KB
testcase_23 AC 60 ms
21,696 KB
testcase_24 AC 60 ms
23,576 KB
testcase_25 AC 60 ms
21,568 KB
testcase_26 AC 60 ms
21,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
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    myScore = 0;
        int otherScore = 0;
        for (int i=0; i < N; i++)
        {
            if (b[i] == 0)    myScore += a[i];
            if (b[i] == 1) otherScore += a[i];
        }

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

0