結果

問題 No.216 FAC
ユーザー kmtrc130kmtrc130
提出日時 2019-03-18 15:38:57
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 62 ms / 1,000 ms
コード長 663 bytes
コンパイル時間 4,029 ms
コンパイル使用メモリ 107,224 KB
実行使用メモリ 23,740 KB
最終ジャッジ日時 2023-09-25 12:58:32
合計ジャッジ時間 5,519 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
21,764 KB
testcase_01 AC 61 ms
21,748 KB
testcase_02 AC 59 ms
21,588 KB
testcase_03 AC 61 ms
21,812 KB
testcase_04 AC 60 ms
21,596 KB
testcase_05 AC 61 ms
21,568 KB
testcase_06 AC 59 ms
21,744 KB
testcase_07 AC 59 ms
21,664 KB
testcase_08 AC 60 ms
21,672 KB
testcase_09 AC 60 ms
21,608 KB
testcase_10 AC 59 ms
21,728 KB
testcase_11 AC 60 ms
19,508 KB
testcase_12 AC 60 ms
21,592 KB
testcase_13 AC 60 ms
23,624 KB
testcase_14 AC 61 ms
21,700 KB
testcase_15 AC 59 ms
19,652 KB
testcase_16 AC 61 ms
21,700 KB
testcase_17 AC 62 ms
23,664 KB
testcase_18 AC 60 ms
23,740 KB
testcase_19 AC 62 ms
19,552 KB
testcase_20 AC 61 ms
21,592 KB
testcase_21 AC 61 ms
19,656 KB
testcase_22 AC 62 ms
23,660 KB
testcase_23 AC 61 ms
21,704 KB
testcase_24 AC 60 ms
21,804 KB
testcase_25 AC 60 ms
21,804 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;

class Program
{
    public void Solve()
    {
        int N = int.Parse(Console.ReadLine());

        int[] A = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
        int[] B = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();

        int[] point = new int[101];
        for (int i = 0; i < N; i++)
        {
            point[B[i]] += A[i];
        }

        int maxPoint = point.Max();
        Console.WriteLine(point[0] == maxPoint ? "YES" : "NO");
    }

    static void Main()
    {
        var solver = new Program();
        solver.Solve();
    }
}
0