結果

問題 No.79 過小評価ダメ・ゼッタイ
コンテスト
ユーザー バカらっく
提出日時 2021-11-10 10:09:16
言語 Kotlin
(2.4.10 + ACL)
コンパイル:
kotlinc -cp /opt/aclib/ac_library.jar _filename_ -include-runtime -d main.jar
実行:
java -cp main.jar:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 242 ms / 5,000 ms
+ 195µs
コード長 329 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 8,103 ms
コンパイル使用メモリ 507,296 KB
実行使用メモリ 56,876 KB
最終ジャッジ日時 2026-09-27 04:09:32
合計ジャッジ時間 13,955 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val l = readLine()!!.split(" ").map { it.toInt() }
    val cnt = mutableMapOf<Int,Int>()
    l.forEach { cnt[it] = (cnt[it]?:0) + 1 }
    val ans = cnt.let { cnt.maxOf { it.value }.let { m -> cnt.filter { it.value == m }.maxOf { it.key } } }
    println(ans)
}
0