結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー kaiyori_labkaiyori_lab
提出日時 2014-11-29 23:40:01
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,616 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 8,872 ms
コンパイル使用メモリ 253,172 KB
実行使用メモリ 80,728 KB
最終ジャッジ日時 2023-09-11 07:31:51
合計ジャッジ時間 44,153 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,153 ms
64,024 KB
testcase_01 AC 1,581 ms
80,060 KB
testcase_02 AC 1,003 ms
63,740 KB
testcase_03 AC 1,005 ms
63,716 KB
testcase_04 AC 1,000 ms
63,364 KB
testcase_05 AC 1,580 ms
78,616 KB
testcase_06 AC 996 ms
63,228 KB
testcase_07 AC 1,004 ms
63,408 KB
testcase_08 AC 1,009 ms
63,644 KB
testcase_09 AC 1,019 ms
63,512 KB
testcase_10 AC 1,016 ms
63,160 KB
testcase_11 AC 999 ms
63,504 KB
testcase_12 AC 1,007 ms
63,544 KB
testcase_13 AC 990 ms
63,436 KB
testcase_14 AC 1,502 ms
78,564 KB
testcase_15 AC 1,360 ms
74,148 KB
testcase_16 AC 1,581 ms
78,996 KB
testcase_17 AC 1,349 ms
74,876 KB
testcase_18 AC 1,530 ms
78,380 KB
testcase_19 AC 1,462 ms
79,120 KB
testcase_20 AC 1,616 ms
80,368 KB
testcase_21 AC 1,097 ms
63,968 KB
testcase_22 AC 1,385 ms
76,328 KB
testcase_23 AC 1,593 ms
79,648 KB
testcase_24 AC 1,615 ms
80,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

object Main extends App{
  val sc = new java.util.Scanner(System.in)
  val N = sc.nextInt
  val arr = List.fill(N)(sc.nextInt).groupBy(e => e).values.toList
    .sortWith{(a, b) => if(a.length == b.length) a(0) > b(0) else (a.length > b.length)}
  println(arr(0)(0))
}
0