結果

問題 No.121 傾向と対策:門松列(その2)
ユーザー さいどさいど
提出日時 2016-12-01 09:48:44
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 378 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 86,884 KB
実行使用メモリ 274,952 KB
最終ジャッジ日時 2023-08-18 11:09:33
合計ジャッジ時間 13,331 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[int(i) for i in input().split(" ")]
def ret(num,li):
    count=0
    if num<3:return count
    for i in range(num-2):
        print("c")
        for e in range(i+1,num-1):
            if li[i]==li[e]:continue
            count+=len([p for p,q in enumerate(li[e+1:]) if (li[i]-li[e])*(li[p+e+1]-li[e])*abs(li[i]-li[p+e+1])>0])

    return count
print(ret(n,a)) 
0