結果

問題 No.870 無敵囲い
ユーザー ABKZABKZ
提出日時 2021-08-12 14:16:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 300 ms
コード長 359 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 86,820 KB
実行使用メモリ 71,460 KB
最終ジャッジ日時 2023-09-11 16:39:45
合計ジャッジ時間 2,782 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,100 KB
testcase_01 AC 71 ms
70,968 KB
testcase_02 AC 74 ms
71,244 KB
testcase_03 AC 74 ms
71,176 KB
testcase_04 AC 74 ms
71,292 KB
testcase_05 AC 72 ms
71,384 KB
testcase_06 AC 74 ms
70,964 KB
testcase_07 AC 74 ms
71,320 KB
testcase_08 AC 72 ms
71,088 KB
testcase_09 AC 73 ms
71,236 KB
testcase_10 AC 73 ms
71,336 KB
testcase_11 AC 73 ms
71,452 KB
testcase_12 AC 72 ms
71,312 KB
testcase_13 AC 71 ms
71,304 KB
testcase_14 AC 72 ms
71,216 KB
testcase_15 AC 71 ms
71,196 KB
testcase_16 AC 72 ms
71,264 KB
testcase_17 AC 73 ms
70,968 KB
testcase_18 AC 73 ms
71,460 KB
testcase_19 AC 73 ms
71,232 KB
testcase_20 AC 72 ms
71,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
op = [map(int, input().split()) for _ in range(N)]

A = [2, 8]
B = [3, 9]
C = [7, 9]
for x1, y1, x2, y2 in op:
    if [x1, y1] == A:
        A = [x2, y2]
    elif [x1, y1] == B:
        B = [x2, y2]
    elif [x1, y1] == C:
        C = [x2, y2]

if (A == [5, 8] and
    B == [4, 8] and
    C == [6, 8]):
    print("YES")
else:
    print("NO")
0