結果
| 問題 | No.1717 Levi-Civita Triangle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-01 13:50:31 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 485 bytes |
| 記録 | |
| コンパイル時間 | 116 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 96,384 KB |
| 最終ジャッジ日時 | 2026-04-09 09:36:49 |
| 合計ジャッジ時間 | 3,013 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 28 |
ソースコード
N = int(input())
A = list(map(int,input().split()))
s1 = {(0,1,2),(1,2,0),(2,0,1)}
s2 = {(2,1,0),(1,0,2),(0,2,1)}
import sys
def calc(l):
n = len(l)
ans = []
for i in range(1,n - 1):
if (l[i-1],l[i],l[i+1]) in s1:
ans.append(1)
elif (l[i-1],l[i],l[i+1]) in s2:
ans.append(2)
else:
ans.append(0)
return ans
if N <= 20:
for _ in range(N):
A = calc(A)
print(A[0])
exit()
else:
print(0)