結果

問題 No.216 FAC
ユーザー funakoshifunakoshi
提出日時 2019-06-27 10:20:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 60 ms / 1,000 ms
コード長 1,256 bytes
コンパイル時間 3,165 ms
コンパイル使用メモリ 99,756 KB
実行使用メモリ 22,836 KB
最終ジャッジ日時 2023-09-09 20:38:27
合計ジャッジ時間 6,122 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
20,820 KB
testcase_01 AC 58 ms
20,656 KB
testcase_02 AC 59 ms
20,788 KB
testcase_03 AC 58 ms
22,836 KB
testcase_04 AC 58 ms
18,824 KB
testcase_05 AC 59 ms
20,652 KB
testcase_06 AC 58 ms
20,708 KB
testcase_07 AC 58 ms
18,848 KB
testcase_08 AC 58 ms
20,680 KB
testcase_09 AC 59 ms
20,808 KB
testcase_10 AC 58 ms
20,668 KB
testcase_11 AC 57 ms
20,716 KB
testcase_12 AC 60 ms
20,696 KB
testcase_13 AC 58 ms
20,596 KB
testcase_14 AC 60 ms
20,832 KB
testcase_15 AC 58 ms
20,920 KB
testcase_16 AC 58 ms
20,880 KB
testcase_17 AC 58 ms
20,676 KB
testcase_18 AC 59 ms
20,888 KB
testcase_19 AC 59 ms
22,696 KB
testcase_20 AC 58 ms
22,756 KB
testcase_21 AC 58 ms
20,920 KB
testcase_22 AC 58 ms
18,628 KB
testcase_23 AC 58 ms
22,728 KB
testcase_24 AC 58 ms
22,712 KB
testcase_25 AC 59 ms
20,744 KB
testcase_26 AC 60 ms
20,704 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;
using System.Text;
using System.Threading.Tasks;

namespace yukicoderTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string[] input2 = Console.ReadLine().Split(' ');
            string[] input3 = Console.ReadLine().Split(' ');
            int n = int.Parse(input);
            int[] score = new int[input2.Length];
            int[] answer = new int[input3.Length];
            int[] point = new int[101];
            for(int i=0;i<n;i++)
            {
                score[i] = int.Parse(input2[i]);
                answer[i] = int.Parse(input3[i]);
            }
            for(int i=0;i<100;i++)
            {
                point[i] = 0;
            }
            for (int i = 0; i < n; i++)
            {
                point[answer[i]] = point[answer[i]] + score[i];
            }
            int max = point[0];
            Array.Sort(point);
            Array.Reverse(point);
            if (max >= point[0])
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }

        }

    }
}
0