結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー kaiyori_labkaiyori_lab
提出日時 2014-11-29 23:46:55
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,665 ms / 5,000 ms
コード長 277 bytes
コンパイル時間 9,415 ms
コンパイル使用メモリ 262,428 KB
実行使用メモリ 79,360 KB
最終ジャッジ日時 2023-09-11 07:31:05
合計ジャッジ時間 45,023 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,221 ms
64,812 KB
testcase_01 AC 1,631 ms
77,804 KB
testcase_02 AC 1,065 ms
63,872 KB
testcase_03 AC 1,059 ms
64,360 KB
testcase_04 AC 1,065 ms
63,988 KB
testcase_05 AC 1,617 ms
76,776 KB
testcase_06 AC 1,054 ms
63,880 KB
testcase_07 AC 1,054 ms
63,856 KB
testcase_08 AC 1,069 ms
64,436 KB
testcase_09 AC 1,076 ms
64,368 KB
testcase_10 AC 1,083 ms
63,816 KB
testcase_11 AC 1,063 ms
63,944 KB
testcase_12 AC 1,061 ms
64,604 KB
testcase_13 AC 1,050 ms
64,252 KB
testcase_14 AC 1,525 ms
75,852 KB
testcase_15 AC 1,430 ms
76,032 KB
testcase_16 AC 1,584 ms
79,360 KB
testcase_17 AC 1,409 ms
76,608 KB
testcase_18 AC 1,593 ms
77,880 KB
testcase_19 AC 1,511 ms
76,304 KB
testcase_20 AC 1,665 ms
77,124 KB
testcase_21 AC 1,175 ms
64,572 KB
testcase_22 AC 1,502 ms
75,528 KB
testcase_23 AC 1,647 ms
77,564 KB
testcase_24 AC 1,653 ms
77,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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