結果

問題 No.2036 Max Middle
ユーザー sotanishysotanishy
提出日時 2022-08-12 21:49:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 102,564 KB
最終ジャッジ日時 2023-10-24 09:30:44
合計ジャッジ時間 2,529 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,400 KB
testcase_01 AC 38 ms
53,400 KB
testcase_02 AC 37 ms
53,400 KB
testcase_03 AC 37 ms
53,400 KB
testcase_04 AC 36 ms
53,400 KB
testcase_05 AC 36 ms
53,400 KB
testcase_06 AC 37 ms
53,400 KB
testcase_07 AC 36 ms
53,400 KB
testcase_08 AC 68 ms
86,136 KB
testcase_09 AC 90 ms
102,376 KB
testcase_10 AC 100 ms
99,524 KB
testcase_11 AC 84 ms
102,564 KB
testcase_12 AC 85 ms
101,584 KB
testcase_13 AC 101 ms
99,684 KB
testcase_14 AC 42 ms
59,916 KB
testcase_15 AC 42 ms
59,916 KB
testcase_16 AC 97 ms
99,684 KB
testcase_17 AC 77 ms
97,864 KB
testcase_18 AC 79 ms
101,512 KB
testcase_19 AC 82 ms
101,732 KB
testcase_20 AC 82 ms
102,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
A = list(map(int, input().split()))
ans = 0
cnt = 0
for i in range(1, N):
    if A[i-1] < A[i]:
        cnt += 1
    else:
        ans += cnt
print(ans)
0