結果

問題 No.870 無敵囲い
ユーザー stngstng
提出日時 2022-07-23 16:13:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 300 ms
コード長 373 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 86,720 KB
実行使用メモリ 71,200 KB
最終ジャッジ日時 2023-09-18 14:35:58
合計ジャッジ時間 3,091 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,168 KB
testcase_01 AC 73 ms
71,076 KB
testcase_02 AC 75 ms
71,076 KB
testcase_03 AC 76 ms
71,068 KB
testcase_04 AC 77 ms
70,972 KB
testcase_05 AC 78 ms
70,996 KB
testcase_06 AC 74 ms
70,996 KB
testcase_07 AC 75 ms
71,032 KB
testcase_08 AC 74 ms
70,864 KB
testcase_09 AC 74 ms
70,996 KB
testcase_10 AC 75 ms
70,888 KB
testcase_11 AC 75 ms
71,180 KB
testcase_12 AC 75 ms
71,120 KB
testcase_13 AC 75 ms
71,200 KB
testcase_14 AC 73 ms
70,996 KB
testcase_15 AC 73 ms
70,924 KB
testcase_16 AC 75 ms
71,164 KB
testcase_17 AC 74 ms
70,728 KB
testcase_18 AC 73 ms
71,076 KB
testcase_19 AC 74 ms
71,040 KB
testcase_20 AC 75 ms
71,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
xy = [[int(i) for i in input().split()] for j in range(n)]
a = [2,8]
b = [3,9]
c = [7,9]

for i in range(n):
    x1,y1,x2,y2 = xy[i]
    xy1 = [x1,y1]
    xy2 = [x2,y2]
    if xy1 == a:
        a = xy2
    elif xy1 == b:
        b = xy2
    elif xy1 == c:
        c = xy2

if a == [5,8] and b == [4,8] and c == [6,8]:
    print("YES")
else:
    print("NO")
0