結果

問題 No.938 賢人を探せ
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2019-12-03 23:20:39
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 689 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 14,144 ms
コンパイル使用メモリ 417,880 KB
実行使用メモリ 58,708 KB
最終ジャッジ日時 2023-08-21 03:34:54
合計ジャッジ時間 26,965 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 689 ms
58,708 KB
testcase_01 AC 289 ms
52,620 KB
testcase_02 AC 291 ms
52,588 KB
testcase_03 AC 304 ms
52,704 KB
testcase_04 AC 292 ms
52,652 KB
testcase_05 AC 289 ms
52,680 KB
testcase_06 AC 286 ms
52,472 KB
testcase_07 AC 291 ms
52,516 KB
testcase_08 AC 478 ms
57,308 KB
testcase_09 AC 522 ms
57,424 KB
testcase_10 AC 295 ms
52,676 KB
testcase_11 AC 515 ms
57,816 KB
testcase_12 AC 543 ms
57,792 KB
testcase_13 AC 524 ms
57,780 KB
testcase_14 AC 522 ms
57,852 KB
testcase_15 AC 517 ms
57,852 KB
testcase_16 AC 543 ms
57,776 KB
testcase_17 AC 524 ms
57,756 KB
testcase_18 AC 514 ms
58,032 KB
testcase_19 AC 527 ms
57,832 KB
testcase_20 AC 516 ms
58,028 KB
testcase_21 AC 519 ms
57,932 KB
testcase_22 AC 654 ms
58,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    val i = readLine()!!.toInt()
    val cheater = LinkedHashMap<String, String>(i)
    repeat(i) {
        val (c, d) = readLine()!!.split(" ")
        cheater[c] = d
    }
    
    val ok = ArrayList<String>()
    cheater.values.forEach { 
        // 被害者
        if (it !in cheater.keys) {
            ok += it
        }
    }
    
    ok.distinct().forEach {
        println(it)
    }
}
0