結果

問題 No.870 無敵囲い
ユーザー naru_1017naru_1017
提出日時 2019-08-30 23:50:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 300 ms
コード長 771 bytes
コンパイル時間 448 ms
コンパイル使用メモリ 10,932 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-09-11 16:15:28
合計ジャッジ時間 1,334 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,936 KB
testcase_01 AC 15 ms
7,808 KB
testcase_02 AC 16 ms
7,796 KB
testcase_03 AC 16 ms
7,940 KB
testcase_04 AC 16 ms
7,868 KB
testcase_05 AC 16 ms
7,736 KB
testcase_06 AC 15 ms
7,780 KB
testcase_07 AC 15 ms
7,872 KB
testcase_08 AC 15 ms
7,828 KB
testcase_09 AC 15 ms
7,932 KB
testcase_10 AC 16 ms
7,900 KB
testcase_11 AC 15 ms
7,940 KB
testcase_12 AC 16 ms
7,940 KB
testcase_13 AC 15 ms
7,900 KB
testcase_14 AC 15 ms
7,816 KB
testcase_15 AC 16 ms
7,884 KB
testcase_16 AC 16 ms
7,816 KB
testcase_17 AC 15 ms
7,816 KB
testcase_18 AC 15 ms
7,796 KB
testcase_19 AC 15 ms
7,808 KB
testcase_20 AC 14 ms
7,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#import pysnooper
#import os,re,sys,operator,math,heapq,string
#from collections import Counter,deque
#from operator import itemgetter
#from itertools import accumulate,combinations,groupby,combinations_with_replacement
from sys import stdin,setrecursionlimit
#from copy import deepcopy

setrecursionlimit(10**6)
input=stdin.readline

n=int(input().rstrip())
mas=[[0]*10 for _ in range(10)]
now=[[""]*10 for _ in range(10)]
now[8][2]="A"
now[9][3]="B"
now[9][7]="C"
for i in range(n):
    x=list(map(int,input().split()))
    mas[x[1]][x[0]]=0
    mas[x[3]][x[2]]=1
    now[x[1]][x[0]],now[x[3]][x[2]]=now[x[3]][x[2]],now[x[1]][x[0]]
if mas[8][5] and now[8][5]=="A" and mas[8][4] and now[8][4]=="B" and mas[8][6] and now[8][6]=="C":
    print("YES")
else:
    print("NO")
0