結果

問題 No.870 無敵囲い
ユーザー ganariya
提出日時 2019-08-31 11:53:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 300 ms
コード長 522 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-29 06:21:44
合計ジャッジ時間 1,326 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

import sys
import copy

sys.setrecursionlimit(1000000)

# input = sys.stdin.readline
# from collections import defaultdict
# import bisect

# ~~~~~~~~~~~~~~~~~~~~~_(^~^ 」 ∠)_~~~~~~~~~~~~~~~~~~~~~

N = int(input())

A = [[0] * 10 for i in range(10)]
A[2][8] = 1
A[3][9] = 2
A[7][9] = 3

for i in range(N):
    x1, y1, x2, y2 = map(int, input().split())
    A[x1][y1], A[x2][y2] = A[x2][y2], A[x1][y1]


if A[5][8] == 1 and A[4][8] == 2 and A[6][8]:
    print("YES")
else:
    print("NO")
0