結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー nanophoto12nanophoto12
提出日時 2014-11-27 23:55:11
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 807 bytes
コンパイル時間 2,892 ms
コンパイル使用メモリ 103,244 KB
実行使用メモリ 28,500 KB
最終ジャッジ日時 2023-09-01 22:29:00
合計ジャッジ時間 6,207 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
22,016 KB
testcase_01 AC 100 ms
28,500 KB
testcase_02 AC 64 ms
21,600 KB
testcase_03 AC 63 ms
21,676 KB
testcase_04 AC 65 ms
23,704 KB
testcase_05 AC 97 ms
26,308 KB
testcase_06 AC 63 ms
21,684 KB
testcase_07 AC 62 ms
21,660 KB
testcase_08 AC 66 ms
21,668 KB
testcase_09 AC 66 ms
23,796 KB
testcase_10 AC 64 ms
23,764 KB
testcase_11 AC 66 ms
21,632 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 90 ms
25,180 KB
testcase_15 AC 83 ms
24,720 KB
testcase_16 AC 94 ms
23,784 KB
testcase_17 AC 80 ms
22,680 KB
testcase_18 AC 94 ms
23,848 KB
testcase_19 AC 87 ms
25,040 KB
testcase_20 AC 98 ms
26,456 KB
testcase_21 AC 74 ms
24,040 KB
testcase_22 AC 83 ms
24,688 KB
testcase_23 AC 97 ms
26,280 KB
testcase_24 AC 100 ms
28,412 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 Probram79
{
    public static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        var array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        var dictionary = new Dictionary<int, int>();
        for (int i = 0; i < n; i++)
        {
            int level = array[i];
            if (dictionary.ContainsKey(level))
            {
                dictionary[level]++;
            }
            else
            {
                dictionary.Add(level,1);
            }
        }
        var keys = dictionary.Keys.ToArray();
        var values = dictionary.Values.ToArray();
        Array.Sort(values, keys);
        Console.WriteLine(keys.Last());
    }
}
0