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