結果
| 問題 | No.1717 Levi-Civita Triangle |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-02-02 04:12:10 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 490 bytes |
| 記録 | |
| コンパイル時間 | 294 ms |
| コンパイル使用メモリ | 82,212 KB |
| 実行使用メモリ | 229,844 KB |
| 最終ジャッジ日時 | 2026-02-02 04:12:59 |
| 合計ジャッジ時間 | 49,048 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 19 |
ソースコード
import sys
input = sys.stdin.readline
from time import time
time0=time()
N=int(input())
A=list(map(int,input().split()))
X=[(0,1,2),(1,2,0),(2,0,1)]
Y=[(2,1,0),(1,0,2),(0,2,1)]
N=len(A)
while len(A)>1:
B=[]
for i in range(len(A)-2):
C=(A[i],A[i+1],A[i+2])
if C in X:
B.append(1)
elif C in Y:
B.append(2)
else:
B.append(0)
A=B
if time()-time0>1.8:
print(0)
exit()
print(A[0])
titia