結果
| 問題 |
No.2702 Nand Nor Matrix
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-12 07:34:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 940 bytes |
| コンパイル時間 | 181 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 103,424 KB |
| 最終ジャッジ日時 | 2024-09-29 22:10:32 |
| 合計ジャッジ時間 | 11,512 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 51 |
ソースコード
import sys
sys.setrecursionlimit((1<<19)-1)
#import pypyjit
#pypyjit.set_param('max_unroll_recursion=-1')
input=sys.stdin.buffer.readline
N=int(input())
A=list(map(int,input().split()))
A.append(A[-1])
B=[A[0]]+[int(input()) for i in range(N-1)]
B.append(B[-1])
col=0
for i in range(1,N):
if A[i]==A[i+1]:
col=i
break
row=0
for i in range(1,N):
if B[i]==B[i+1]:
row=i
break
if A[1]!=B[1]:
row=0
col=0
change=0
if A[1]==B[1]==0:
A=[i^1 for i in A]
B=[i^1 for i in B]
change=1
Q=int(input())
for i in range(Q):
T,R,C=map(int,input().split())
R-=1
C-=1
T-=change
if R==0:
print("type-R0")
continue
if C==0:
print("type-C0")
continue
if T<=0:
print("type-T0")
continue
if R<=row and C<=col and R+C-1<=T:
print("type-inplace")
continue
else:
print("type-out")
continue