結果

問題 No.1435 Mmm......
ユーザー da_abda_ab
提出日時 2021-03-19 23:15:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 526 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 38,120 KB
最終ジャッジ日時 2024-04-29 18:56:00
合計ジャッジ時間 10,091 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
16,128 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 32 ms
10,752 KB
testcase_04 AC 29 ms
10,624 KB
testcase_05 AC 27 ms
10,624 KB
testcase_06 AC 334 ms
22,672 KB
testcase_07 AC 391 ms
25,288 KB
testcase_08 AC 461 ms
27,404 KB
testcase_09 AC 446 ms
26,156 KB
testcase_10 AC 388 ms
24,188 KB
testcase_11 AC 378 ms
24,528 KB
testcase_12 AC 347 ms
22,936 KB
testcase_13 AC 334 ms
23,036 KB
testcase_14 AC 261 ms
20,036 KB
testcase_15 AC 507 ms
28,128 KB
testcase_16 AC 392 ms
25,140 KB
testcase_17 AC 286 ms
21,616 KB
testcase_18 AC 488 ms
28,228 KB
testcase_19 AC 361 ms
23,856 KB
testcase_20 AC 417 ms
26,912 KB
testcase_21 TLE -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# 1435 Mmm......

n=int(input())
integers=list(map(int,input().split()))

result=0
for l in range(n-1):
    minNum0=integers[l]
    minNum1=2*1e5+1
    maxNum=integers[l]

    r=l+1
    while r<n:
        if integers[r]<minNum0:
            minNum1=minNum0
            minNum0=integers[r]
        elif integers[r]<minNum1:
            minNum1=integers[r]
        if integers[r]>maxNum:
            maxNum=integers[r]
        if maxNum>minNum0+minNum1:
            break
        result+=1
        r+=1        

print(result)


0