結果
| 問題 |
No.1380 Borderline
|
| コンテスト | |
| ユーザー |
Ultimate_Tea_04
|
| 提出日時 | 2021-02-07 21:27:03 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 279 bytes |
| コンパイル時間 | 150 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-04 14:39:31 |
| 合計ジャッジ時間 | 2,634 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 36 RE * 5 |
ソースコード
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)
Ultimate_Tea_04