結果

問題 No.121 傾向と対策:門松列(その2)
ユーザー さいどさいど
提出日時 2016-12-01 09:46:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 378 bytes
コンパイル時間 475 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 22,116 KB
最終ジャッジ日時 2023-08-18 11:02:48
合計ジャッジ時間 13,192 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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