結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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):
        for e in range(i+1,num-1):
            for p in range(e+1,num):
                if (li[i]-li[e])*(li[p]-li[e])*abs(li[i]-li[p])>0:
                    count+=1
    return count
print(ret(n,a))
0