結果

問題 No.870 無敵囲い
ユーザー minokasagominokasago
提出日時 2019-11-01 06:54:24
言語 Kotlin
(1.9.23)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 550 bytes
コンパイル時間 14,249 ms
コンパイル使用メモリ 417,284 KB
実行使用メモリ 53,104 KB
最終ジャッジ日時 2023-09-11 16:23:13
合計ジャッジ時間 20,845 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 298 ms
52,696 KB
testcase_01 TLE -
testcase_02 AC 296 ms
52,728 KB
testcase_03 AC 296 ms
52,960 KB
testcase_04 AC 292 ms
52,652 KB
testcase_05 AC 295 ms
52,756 KB
testcase_06 AC 296 ms
52,684 KB
testcase_07 AC 297 ms
52,860 KB
testcase_08 AC 298 ms
52,688 KB
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 AC 298 ms
52,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

    for (n in 1..N) {
        val (x1, y1, x2, y2) = readLine()!!.split(" ").map(Integer::parseInt)
        for (i in 0..4 step 2) {
            if (abc[i] == x1 && abc[i+1] == y1) {
                abc[i] = x2
                abc[i+1] = y2
            }
        }
    }

    for (i in 0..5) {
        if (abc[i] != invincible[i]) {
            println("NO")
            return
        }
    }
    println("YES")
}
0