結果

問題 No.1717 Levi-Civita Triangle
ユーザー taiga0629kyoprotaiga0629kyopro
提出日時 2021-10-22 23:26:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 81,772 KB
実行使用メモリ 95,796 KB
最終ジャッジ日時 2023-10-24 15:33:11
合計ジャッジ時間 3,515 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,524 KB
testcase_01 AC 36 ms
53,524 KB
testcase_02 AC 37 ms
53,524 KB
testcase_03 AC 34 ms
53,524 KB
testcase_04 AC 38 ms
58,948 KB
testcase_05 AC 38 ms
59,528 KB
testcase_06 AC 38 ms
62,156 KB
testcase_07 AC 55 ms
82,212 KB
testcase_08 AC 35 ms
53,524 KB
testcase_09 AC 34 ms
53,524 KB
testcase_10 AC 40 ms
59,528 KB
testcase_11 AC 38 ms
61,852 KB
testcase_12 AC 46 ms
71,844 KB
testcase_13 AC 34 ms
53,524 KB
testcase_14 AC 42 ms
61,596 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 35 ms
53,524 KB
testcase_19 AC 44 ms
65,700 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 34 ms
53,524 KB
testcase_24 AC 44 ms
65,700 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 34 ms
53,524 KB
testcase_29 AC 42 ms
61,604 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
0