結果

問題 No.1380 Borderline
ユーザー Ultimate_Tea_04Ultimate_Tea_04
提出日時 2021-02-07 21:27:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 279 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 10,636 KB
実行使用メモリ 8,576 KB
最終ジャッジ日時 2023-09-17 20:30:28
合計ジャッジ時間 2,898 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,544 KB
testcase_01 AC 18 ms
8,528 KB
testcase_02 AC 18 ms
8,468 KB
testcase_03 AC 18 ms
8,376 KB
testcase_04 AC 18 ms
8,548 KB
testcase_05 RE -
testcase_06 AC 18 ms
8,352 KB
testcase_07 RE -
testcase_08 AC 18 ms
8,420 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 18 ms
8,464 KB
testcase_12 AC 19 ms
8,344 KB
testcase_13 AC 18 ms
8,564 KB
testcase_14 AC 19 ms
8,488 KB
testcase_15 AC 18 ms
8,388 KB
testcase_16 AC 18 ms
8,328 KB
testcase_17 AC 19 ms
8,384 KB
testcase_18 AC 18 ms
8,548 KB
testcase_19 AC 19 ms
8,532 KB
testcase_20 AC 19 ms
8,576 KB
testcase_21 AC 18 ms
8,560 KB
testcase_22 AC 19 ms
8,384 KB
testcase_23 AC 19 ms
8,556 KB
testcase_24 AC 19 ms
8,564 KB
testcase_25 AC 18 ms
8,392 KB
testcase_26 AC 19 ms
8,368 KB
testcase_27 AC 18 ms
8,324 KB
testcase_28 AC 18 ms
8,428 KB
testcase_29 AC 18 ms
8,380 KB
testcase_30 AC 19 ms
8,388 KB
testcase_31 AC 18 ms
8,576 KB
testcase_32 AC 18 ms
8,368 KB
testcase_33 AC 19 ms
8,516 KB
testcase_34 AC 19 ms
8,480 KB
testcase_35 AC 18 ms
8,568 KB
testcase_36 AC 19 ms
8,424 KB
testcase_37 AC 18 ms
8,540 KB
testcase_38 AC 18 ms
8,364 KB
testcase_39 AC 18 ms
8,572 KB
testcase_40 AC 19 ms
8,324 KB
testcase_41 AC 18 ms
8,372 KB
testcase_42 AC 18 ms
8,552 KB
testcase_43 AC 19 ms
8,544 KB
testcase_44 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections as c
n,k = map(int,input().split())
p = list(map(int,input().split()))
s = c.Counter(p)
t = []
for i,j in s.items():
    t.append([i,j])
t.sort(reverse = True)
cnt = 0
ans = 0
while ans+t[cnt][1]<=k and cnt<len(t):
    ans += t[cnt][1]
    cnt += 1
print(ans)
0