結果
| 問題 |
No.1717 Levi-Civita Triangle
|
| コンテスト | |
| ユーザー |
👑 SPD_9X2
|
| 提出日時 | 2025-10-26 00:29:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 476 bytes |
| コンパイル時間 | 345 ms |
| コンパイル使用メモリ | 82,428 KB |
| 実行使用メモリ | 277,764 KB |
| 最終ジャッジ日時 | 2025-10-26 00:29:55 |
| 合計ジャッジ時間 | 7,727 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 TLE * 2 -- * 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