結果
| 問題 | No.1438 Broken Drawers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-26 21:28:22 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 435 ms / 2,000 ms |
| コード長 | 227 bytes |
| 記録 | |
| コンパイル時間 | 386 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 53,056 KB |
| 最終ジャッジ日時 | 2026-05-22 19:35:46 |
| 合計ジャッジ時間 | 9,051 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)