結果

問題 No.1285 ゴミ捨て
ユーザー c-yanc-yan
提出日時 2020-11-13 21:23:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 210 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2023-09-30 02:31:03
合計ジャッジ時間 2,521 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 16 ms
8,008 KB
testcase_02 AC 16 ms
8,000 KB
testcase_03 AC 15 ms
7,872 KB
testcase_04 AC 15 ms
8,052 KB
testcase_05 AC 16 ms
7,952 KB
testcase_06 AC 15 ms
7,916 KB
testcase_07 WA -
testcase_08 AC 18 ms
8,256 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 29 ms
10,012 KB
testcase_17 AC 28 ms
9,976 KB
testcase_18 AC 27 ms
9,944 KB
testcase_19 WA -
testcase_20 AC 25 ms
9,756 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import heappush, heapreplace

N, *A = map(int, open(0).read().split())

A.sort()
q = [A[0]]
for a in A[1:]:
    if a == q[0]:
        heappush(q, a)
    else:
        heapreplace(q, a)
print(len(q))
0