結果
| 問題 | No.1717 Levi-Civita Triangle |
| コンテスト | |
| ユーザー |
SPD_9X2
|
| 提出日時 | 2025-10-26 00:29:46 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 476 bytes |
| 記録 | |
| コンパイル時間 | 236 ms |
| コンパイル使用メモリ | 95,720 KB |
| 実行使用メモリ | 314,716 KB |
| 最終ジャッジ日時 | 2026-07-16 00:31:32 |
| 合計ジャッジ時間 | 7,814 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 TLE * 1 -- * 27 |
ソースコード
"""
https://yukicoder.me/problems/no/1717
すぐに0だけになる?
"""
N = int(input())
A = list(map(int,input().split()))
while len(A) >= 2:
B = []
for i in range(len(A)-2):
tup = (A[i],A[i+1],A[i+2])
if tup in ( (0,1,2),(1,2,0),(2,0,1) ):
B.append(1)
elif tup in ( (2,1,0),(1,0,2),(0,2,1) ):
B.append(2)
else:
B.append(0)
if sum(B) == 0:
B = [0]
A = B
print (A[0])
SPD_9X2