結果
| 問題 |
No.870 無敵囲い
|
| コンテスト | |
| ユーザー |
naru_1017
|
| 提出日時 | 2019-08-30 23:50:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 300 ms |
| コード長 | 771 bytes |
| コンパイル時間 | 78 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-29 06:21:29 |
| 合計ジャッジ時間 | 1,446 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#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")
naru_1017