結果

問題 No.1438 Broken Drawers
ユーザー brthyyjpbrthyyjp
提出日時 2021-03-26 21:25:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 586 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 129,668 KB
最終ジャッジ日時 2023-08-19 07:01:28
合計ジャッジ時間 11,524 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,028 KB
testcase_01 AC 61 ms
70,836 KB
testcase_02 AC 63 ms
71,204 KB
testcase_03 AC 62 ms
71,220 KB
testcase_04 AC 62 ms
71,192 KB
testcase_05 AC 63 ms
71,196 KB
testcase_06 AC 183 ms
129,668 KB
testcase_07 AC 148 ms
107,652 KB
testcase_08 AC 62 ms
71,040 KB
testcase_09 AC 62 ms
71,172 KB
testcase_10 AC 61 ms
71,264 KB
testcase_11 AC 85 ms
77,468 KB
testcase_12 AC 233 ms
93,188 KB
testcase_13 AC 347 ms
105,460 KB
testcase_14 AC 177 ms
87,292 KB
testcase_15 AC 518 ms
112,576 KB
testcase_16 AC 498 ms
109,512 KB
testcase_17 AC 549 ms
113,432 KB
testcase_18 AC 554 ms
113,320 KB
testcase_19 AC 542 ms
113,536 KB
testcase_20 AC 558 ms
113,136 KB
testcase_21 AC 534 ms
112,972 KB
testcase_22 AC 549 ms
112,816 KB
testcase_23 AC 586 ms
113,068 KB
testcase_24 AC 562 ms
113,244 KB
testcase_25 AC 558 ms
113,268 KB
testcase_26 AC 548 ms
112,980 KB
testcase_27 AC 550 ms
113,140 KB
権限があれば一括ダウンロードができます

ソースコード

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