結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
![]() |
提出日時 | 2014-11-27 23:55:11 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 807 bytes |
コンパイル時間 | 2,188 ms |
コンパイル使用メモリ | 106,240 KB |
実行使用メモリ | 24,832 KB |
最終ジャッジ日時 | 2025-01-03 09:38:36 |
合計ジャッジ時間 | 4,623 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 WA * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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()); } }