結果
| 問題 | No.1438 Broken Drawers | 
| コンテスト | |
| ユーザー |  Kude | 
| 提出日時 | 2021-03-26 21:28:30 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 99 ms / 2,000 ms | 
| コード長 | 193 bytes | 
| コンパイル時間 | 350 ms | 
| コンパイル使用メモリ | 82,452 KB | 
| 実行使用メモリ | 106,344 KB | 
| 最終ジャッジ日時 | 2024-11-28 21:29:58 | 
| 合計ジャッジ時間 | 3,570 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 25 | 
ソースコード
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)
            
            
            
        