結果

問題 No.1438 Broken Drawers
ユーザー brthyyjp
提出日時 2021-03-26 21:25:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 658 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 82,764 KB
実行使用メモリ 129,508 KB
最終ジャッジ日時 2024-11-28 21:25:01
合計ジャッジ時間 11,071 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int,input().split()))
X = []
for i, a in enumerate(A):
    X.append((a, i))
X.sort()
res = []
used = set()
for a, i in X:
    if i+1 not in used:
        res.append(a)
        used.add(i)
#print(res)
print(len(res))
0