結果
| 問題 | No.1717 Levi-Civita Triangle | 
| コンテスト | |
| ユーザー |  taiga0629kyopro | 
| 提出日時 | 2021-10-22 23:26:54 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 426 bytes | 
| コンパイル時間 | 254 ms | 
| コンパイル使用メモリ | 81,932 KB | 
| 実行使用メモリ | 97,416 KB | 
| 最終ジャッジ日時 | 2024-09-23 07:58:12 | 
| 合計ジャッジ時間 | 3,897 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 WA * 24 | 
ソースコード
n=int(input())
m=2*n+1
x=list(map(int,input().split()))
def f(x):
    one=[(0,1,2),(1,2,0),(2,0,1)]
    two=[(2,1,0),(1,0,2),(0,2,1)]
    while len(x)>1:
        y=[]
        for i in range(len(x)-2):
            tup=(x[i],x[i+1],x[i+2])
            if tup in one:y.append(1)
            elif tup in two:y.append(2)
            else:y.append(0)
        x=y
    return x[0]
if len(x)>200:
    print(0)
else:
    print(f(x))
            
            
            
        