結果

問題 No.216 FAC
ユーザー mencottonmencotton
提出日時 2017-12-30 16:49:58
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 2,154 ms
コンパイル使用メモリ 100,716 KB
実行使用メモリ 23,800 KB
最終ジャッジ日時 2023-08-23 11:04:08
合計ジャッジ時間 5,079 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
21,780 KB
testcase_01 AC 61 ms
21,680 KB
testcase_02 AC 59 ms
21,640 KB
testcase_03 AC 60 ms
21,708 KB
testcase_04 AC 60 ms
23,764 KB
testcase_05 AC 60 ms
21,696 KB
testcase_06 AC 59 ms
21,740 KB
testcase_07 AC 59 ms
19,596 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 60 ms
21,736 KB
testcase_12 WA -
testcase_13 AC 59 ms
21,704 KB
testcase_14 WA -
testcase_15 AC 59 ms
21,656 KB
testcase_16 AC 60 ms
23,664 KB
testcase_17 AC 61 ms
23,664 KB
testcase_18 WA -
testcase_19 AC 60 ms
21,620 KB
testcase_20 WA -
testcase_21 AC 61 ms
21,592 KB
testcase_22 AC 60 ms
21,616 KB
testcase_23 AC 60 ms
21,720 KB
testcase_24 WA -
testcase_25 AC 60 ms
21,644 KB
testcase_26 AC 60 ms
21,564 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.Collections.Generic;
using System.Linq;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int[] y = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int canget = 0;
            for (int i = 0; i < n; i++)
            {
                if (y[i] == 0) canget += x[i];
            }
            Console.WriteLine(canget >= x.Sum() - canget ? "YES" : "NO");
        }
    }
}
0