結果
| 問題 | No.1438 Broken Drawers | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-03-26 21:28:22 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 582 ms / 2,000 ms | 
| コード長 | 227 bytes | 
| コンパイル時間 | 94 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 48,808 KB | 
| 最終ジャッジ日時 | 2024-11-28 21:30:29 | 
| 合計ジャッジ時間 | 10,133 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 25 | 
ソースコード
N = int(input())
A = map(int, input().split())
As = [(s, i) for i, s in enumerate(A)]
As.sort()
op = [False] * N
ans = 0
for _, i in As:
    if i + 1 < N and op[i + 1]:
        continue
    op[i] = True
    ans += 1
print(ans)
            
            
            
        