結果

問題 No.870 無敵囲い
ユーザー pypypymipypypymi
提出日時 2022-03-10 12:22:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 300 ms
コード長 264 bytes
コンパイル時間 561 ms
コンパイル使用メモリ 86,740 KB
実行使用メモリ 71,272 KB
最終ジャッジ日時 2023-10-12 14:40:58
合計ジャッジ時間 3,601 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,128 KB
testcase_01 AC 79 ms
71,272 KB
testcase_02 AC 77 ms
70,992 KB
testcase_03 AC 78 ms
70,804 KB
testcase_04 AC 75 ms
71,128 KB
testcase_05 AC 76 ms
71,188 KB
testcase_06 AC 79 ms
71,088 KB
testcase_07 AC 79 ms
71,116 KB
testcase_08 AC 78 ms
71,268 KB
testcase_09 AC 77 ms
71,188 KB
testcase_10 AC 80 ms
70,996 KB
testcase_11 AC 78 ms
71,200 KB
testcase_12 AC 78 ms
71,128 KB
testcase_13 AC 77 ms
71,160 KB
testcase_14 AC 79 ms
71,132 KB
testcase_15 AC 79 ms
71,128 KB
testcase_16 AC 81 ms
71,272 KB
testcase_17 AC 80 ms
71,072 KB
testcase_18 AC 78 ms
71,128 KB
testcase_19 AC 78 ms
71,100 KB
testcase_20 AC 79 ms
70,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
start = [[2,8],[3,9],[7,9]]
for i in range(n):
    xy = list(map(int,input().split()))
    xy1 = xy[:2]
    xy2 = xy[2:]
    if xy1 in start:
        start[start.index(xy1)]=xy2
print("YES") if start==[[5, 8], [4, 8], [6, 8]] else print("NO")
    
0