結果

問題 No.1438 Broken Drawers
ユーザー KudeKude
提出日時 2021-03-26 21:28:30
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 193 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 107,456 KB
最終ジャッジ日時 2023-08-19 07:04:50
合計ジャッジ時間 4,613 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,372 KB
testcase_01 AC 72 ms
70,812 KB
testcase_02 AC 73 ms
71,384 KB
testcase_03 AC 73 ms
71,308 KB
testcase_04 AC 73 ms
71,376 KB
testcase_05 AC 75 ms
71,224 KB
testcase_06 AC 116 ms
106,804 KB
testcase_07 AC 111 ms
106,588 KB
testcase_08 AC 74 ms
71,052 KB
testcase_09 AC 73 ms
71,304 KB
testcase_10 AC 73 ms
70,824 KB
testcase_11 AC 81 ms
76,460 KB
testcase_12 AC 93 ms
86,584 KB
testcase_13 AC 106 ms
94,288 KB
testcase_14 AC 93 ms
83,036 KB
testcase_15 AC 116 ms
103,476 KB
testcase_16 AC 118 ms
103,528 KB
testcase_17 AC 126 ms
107,044 KB
testcase_18 AC 123 ms
107,168 KB
testcase_19 AC 121 ms
107,456 KB
testcase_20 AC 121 ms
107,276 KB
testcase_21 AC 129 ms
106,956 KB
testcase_22 AC 122 ms
107,256 KB
testcase_23 AC 125 ms
107,264 KB
testcase_24 AC 123 ms
107,324 KB
testcase_25 AC 125 ms
107,376 KB
testcase_26 AC 126 ms
107,064 KB
testcase_27 AC 122 ms
107,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
i = 0
ans = 0
while i < n:
    j = i + 1
    while j < n and a[j-1] > a[j]:
        j += 1
    ans += (j - i + 1) // 2
    i = j
print(ans)
0