結果

問題 No.870 無敵囲い
コンテスト
ユーザー minokasago
提出日時 2019-11-01 05:33:44
言語 Kotlin
(2.3.10)
コンパイル:
kotlinc _filename_ -include-runtime -d main.jar
実行:
kotlin main.jar
結果
AC  
実行時間 194 ms / 300 ms
コード長 515 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 8,124 ms
コンパイル使用メモリ 461,360 KB
実行使用メモリ 58,880 KB
最終ジャッジ日時 2026-03-18 16:35:06
合計ジャッジ時間 13,162 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fun main()
{
    val N = readLine()!!.toInt()

    var abc = arrayOf(2 to 8, 3 to 9, 7 to 9)
    val invincible = arrayOf(5 to 8, 4 to 8, 6 to 8)

    repeat(N) {
        val xy: List<Int> = readLine()!!.split(" ").map { it.toInt() }
        for (i in abc.indices) {
            if (abc[i].first == xy[0] && abc[i].second == xy[1]) {
                abc[i] = Pair(xy[2], xy[3])
            }
        }
    }

    if (abc contentEquals invincible) {
        println("YES")
    } else {
        println("NO")
    }
}
0