結果
| 問題 |
No.1380 Borderline
|
| コンテスト | |
| ユーザー |
tktk_snsn
|
| 提出日時 | 2021-03-24 00:20:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 227 bytes |
| コンパイル時間 | 352 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-26 08:01:00 |
| 合計ジャッジ時間 | 2,676 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 41 |
ソースコード
from collections import Counter
N, K = map(int, input().split())
A = list(map(int, input().split()))
c = Counter(A)
ans = 0
for x in sorted(set(A), reverse=True):
if ans + c[x] > K:
break
ans += c[x]
print(ans)
tktk_snsn