結果

問題 No.2092 Conjugation
ユーザー 👑 箱
提出日時 2022-08-31 07:08:04
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 625 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 13,114 ms
コンパイル使用メモリ 418,384 KB
実行使用メモリ 67,968 KB
最終ジャッジ日時 2023-08-23 19:18:27
合計ジャッジ時間 24,420 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 321 ms
57,000 KB
testcase_01 AC 316 ms
57,032 KB
testcase_02 AC 322 ms
57,164 KB
testcase_03 AC 328 ms
56,988 KB
testcase_04 AC 335 ms
57,056 KB
testcase_05 AC 332 ms
57,088 KB
testcase_06 AC 331 ms
57,028 KB
testcase_07 AC 406 ms
57,272 KB
testcase_08 AC 615 ms
61,636 KB
testcase_09 AC 590 ms
61,676 KB
testcase_10 AC 581 ms
61,360 KB
testcase_11 AC 585 ms
61,808 KB
testcase_12 AC 569 ms
61,212 KB
testcase_13 AC 534 ms
57,924 KB
testcase_14 AC 500 ms
58,064 KB
testcase_15 AC 579 ms
61,228 KB
testcase_16 AC 616 ms
61,308 KB
testcase_17 AC 625 ms
67,968 KB
testcase_18 AC 611 ms
63,296 KB
testcase_19 AC 494 ms
59,092 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:2:9: warning: variable 'n' is never used
    val n = readln().toInt()
        ^

ソースコード

diff #

fun main() {
    val n = readln().toInt()
    val a = readln().split(" ").map { it.toInt() }
    val b = Array(100001) { 0 }
    for (v in a) {
        b[v]++
    }
    for (i in 99999 downTo 0) {
        b[i] += b[i + 1]
    }
    println(b.drop(1).take(a[0]).joinToString(" "))
}
0