結果
| 問題 | No.870 無敵囲い | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-11-16 15:27:36 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 27 ms / 300 ms | 
| コード長 | 258 bytes | 
| コンパイル時間 | 68 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-06-29 06:45:57 | 
| 合計ジャッジ時間 | 1,209 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
ソースコード
n=int(input())
x=[2,8]
y=[3,9]
z=[7,9]
for i in range(n):
    a,b,c,d=map(int,input().split())
    if [a,b]==x:
        x=[c,d]
    elif [a,b]==y:
        y=[c,d]
    elif [a,b]==z:
        z=[c,d]
print("YES" if x==[5,8] and y==[4,8] and z==[6,8] else "NO")
            
            
            
        