結果

問題 No.870 無敵囲い
ユーザー ganariyaganariya
提出日時 2019-08-31 11:53:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 300 ms
コード長 522 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 10,832 KB
実行使用メモリ 8,456 KB
最終ジャッジ日時 2023-09-11 16:15:46
合計ジャッジ時間 1,516 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,424 KB
testcase_01 AC 18 ms
8,292 KB
testcase_02 AC 18 ms
8,284 KB
testcase_03 AC 18 ms
8,368 KB
testcase_04 AC 18 ms
8,440 KB
testcase_05 AC 19 ms
8,304 KB
testcase_06 AC 18 ms
8,372 KB
testcase_07 AC 18 ms
8,416 KB
testcase_08 AC 18 ms
8,276 KB
testcase_09 AC 18 ms
8,236 KB
testcase_10 AC 18 ms
8,440 KB
testcase_11 AC 19 ms
8,436 KB
testcase_12 AC 18 ms
8,456 KB
testcase_13 AC 19 ms
8,424 KB
testcase_14 AC 19 ms
8,276 KB
testcase_15 AC 19 ms
8,292 KB
testcase_16 AC 18 ms
8,424 KB
testcase_17 AC 18 ms
8,288 KB
testcase_18 AC 18 ms
8,424 KB
testcase_19 AC 19 ms
8,356 KB
testcase_20 AC 19 ms
8,280 KB
権限があれば一括ダウンロードができます

ソースコード

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