結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
19,396 KB
testcase_01 AC 59 ms
21,760 KB
testcase_02 AC 59 ms
21,400 KB
testcase_03 WA -
testcase_04 AC 60 ms
21,760 KB
testcase_05 WA -
testcase_06 AC 59 ms
19,308 KB
testcase_07 AC 58 ms
21,368 KB
testcase_08 AC 59 ms
21,552 KB
testcase_09 AC 60 ms
21,676 KB
testcase_10 AC 60 ms
21,664 KB
testcase_11 AC 59 ms
21,444 KB
testcase_12 AC 59 ms
23,448 KB
testcase_13 WA -
testcase_14 AC 60 ms
21,492 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 60 ms
21,516 KB
testcase_19 WA -
testcase_20 AC 60 ms
21,436 KB
testcase_21 WA -
testcase_22 AC 60 ms
21,424 KB
testcase_23 WA -
testcase_24 AC 59 ms
23,584 KB
testcase_25 AC 59 ms
21,424 KB
testcase_26 AC 59 ms
21,536 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 >= otherScore) ? "YES" : "NO");
    }
}

0