結果

問題 No.216 FAC
ユーザー funakoshifunakoshi
提出日時 2019-06-27 10:08:08
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,216 bytes
コンパイル時間 3,952 ms
コンパイル使用メモリ 103,856 KB
実行使用メモリ 22,840 KB
最終ジャッジ日時 2023-09-09 16:59:44
合計ジャッジ時間 5,618 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
22,840 KB
testcase_01 AC 57 ms
20,704 KB
testcase_02 AC 57 ms
20,840 KB
testcase_03 RE -
testcase_04 AC 57 ms
22,712 KB
testcase_05 RE -
testcase_06 AC 57 ms
20,764 KB
testcase_07 AC 57 ms
22,660 KB
testcase_08 AC 57 ms
20,776 KB
testcase_09 AC 57 ms
20,668 KB
testcase_10 AC 58 ms
20,780 KB
testcase_11 AC 58 ms
20,780 KB
testcase_12 AC 57 ms
18,568 KB
testcase_13 RE -
testcase_14 AC 57 ms
18,744 KB
testcase_15 RE -
testcase_16 AC 59 ms
20,884 KB
testcase_17 RE -
testcase_18 AC 58 ms
22,728 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 57 ms
18,796 KB
testcase_22 RE -
testcase_23 AC 58 ms
20,724 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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[100];
            for(int i=0;i<score.Length;i++)
            {
                score[i] = int.Parse(input2[i]);
                answer[i] = int.Parse(input3[i]);

                point[i] = 0;
            }
            for (int i = 0; i < score.Length; 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