結果

問題 No.216 FAC
ユーザー curryudon08curryudon08
提出日時 2020-06-15 02:57:21
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 659 bytes
コンパイル時間 2,408 ms
コンパイル使用メモリ 106,256 KB
実行使用メモリ 23,716 KB
最終ジャッジ日時 2023-09-10 21:50:11
合計ジャッジ時間 5,576 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
21,660 KB
testcase_01 AC 61 ms
21,732 KB
testcase_02 AC 60 ms
21,600 KB
testcase_03 AC 60 ms
21,584 KB
testcase_04 AC 61 ms
23,716 KB
testcase_05 AC 61 ms
21,676 KB
testcase_06 AC 61 ms
21,516 KB
testcase_07 AC 61 ms
21,736 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 60 ms
21,788 KB
testcase_12 WA -
testcase_13 AC 59 ms
21,660 KB
testcase_14 WA -
testcase_15 AC 60 ms
21,812 KB
testcase_16 AC 59 ms
21,672 KB
testcase_17 AC 60 ms
21,588 KB
testcase_18 WA -
testcase_19 AC 60 ms
21,656 KB
testcase_20 WA -
testcase_21 AC 59 ms
21,680 KB
testcase_22 AC 59 ms
21,812 KB
testcase_23 AC 60 ms
21,696 KB
testcase_24 WA -
testcase_25 AC 60 ms
21,604 KB
testcase_26 AC 59 ms
19,720 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

namespace _0216
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            var b = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();

            var s1 = 0;
            var s2 = 0;
            for(var i = 0; i < n; i++){
                if(b[i] == 0){
                    s1 += a[i];
                }else{
                    s2 += a[i];
                }
            }

            Console.WriteLine(s1 >= s2 ? "YES" : "NO");
        }
    }
}
0