結果
| 問題 | No.870 無敵囲い | 
| コンテスト | |
| ユーザー |  双六 | 
| 提出日時 | 2020-08-11 17:46:50 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 41 ms / 300 ms | 
| コード長 | 588 bytes | 
| コンパイル時間 | 119 ms | 
| コンパイル使用メモリ | 82,136 KB | 
| 実行使用メモリ | 55,636 KB | 
| 最終ジャッジ日時 | 2024-06-29 06:43:57 | 
| 合計ジャッジ時間 | 1,529 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
ソースコード
# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")
def getlist():
	return list(map(int, input().split()))
#処理内容
def main():
	N = int(input())
	table = [[None] * 10 for i in range(10)]
	table[2][8] = 0
	table[3][9] = 1
	table[7][9] = 2
	for i in range(N):
		x1, y1, x2, y2 = getlist()
		table[x2][y2] = table[x1][y1]
		table[x1][y1] = None
	if table[5][8] == 0 and table[4][8] == 1 and table[6][8] == 2:
		print("YES")
	else:
		print("NO")
if __name__ == '__main__':
	main()
            
            
            
        