結果
問題 |
No.1438 Broken Drawers
|
ユーザー |
|
提出日時 | 2021-03-26 23:45:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 699 ms / 2,000 ms |
コード長 | 214 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 82,540 KB |
実行使用メモリ | 110,976 KB |
最終ジャッジ日時 | 2024-11-29 02:06:34 |
合計ジャッジ時間 | 11,658 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
n = int(input()) A = list(map(int,input().split())) sA = [[A[i],i] for i in range(n)] sA.sort() use = [0]*(n+1) ans = 0 for a,ind in sA: if use[ind+1]: continue ans += 1 use[ind] = 1 print(ans)