結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー bluemeganebluemegane
提出日時 2018-09-28 20:09:04
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 55 ms / 5,000 ms
コード長 621 bytes
コンパイル時間 1,040 ms
コンパイル使用メモリ 114,480 KB
実行使用メモリ 31,672 KB
最終ジャッジ日時 2024-04-20 10:01:47
合計ジャッジ時間 3,039 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
27,528 KB
testcase_01 AC 55 ms
31,672 KB
testcase_02 AC 31 ms
25,088 KB
testcase_03 AC 30 ms
24,752 KB
testcase_04 AC 30 ms
24,828 KB
testcase_05 AC 55 ms
29,928 KB
testcase_06 AC 29 ms
25,388 KB
testcase_07 AC 30 ms
24,960 KB
testcase_08 AC 31 ms
26,900 KB
testcase_09 AC 29 ms
27,128 KB
testcase_10 AC 29 ms
27,128 KB
testcase_11 AC 29 ms
25,212 KB
testcase_12 AC 28 ms
25,084 KB
testcase_13 AC 29 ms
25,388 KB
testcase_14 AC 45 ms
24,136 KB
testcase_15 AC 39 ms
28,120 KB
testcase_16 AC 50 ms
26,988 KB
testcase_17 AC 39 ms
28,536 KB
testcase_18 AC 49 ms
27,088 KB
testcase_19 AC 44 ms
26,544 KB
testcase_20 AC 54 ms
29,924 KB
testcase_21 AC 34 ms
25,600 KB
testcase_22 AC 42 ms
28,300 KB
testcase_23 AC 53 ms
31,308 KB
testcase_24 AC 54 ms
31,492 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System.Linq;
using System;

public class P
{
    public int LvL { get; set; }
    public int c { get; set; }
}

public class Hello
{
    public static void Main()
    {
        var ps = new P[6];
        for (int i = 0; i < 6; i++) ps[i] = new P { LvL = i };
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        for (int i = 0; i < n; i++) ps[a[i] - 1].c++;
        var ans = ps.OrderByDescending(x => x.c).ThenByDescending(x => x.LvL).First().LvL + 1;
        Console.WriteLine(ans);
    }
}
0