結果

問題 No.1380 Borderline
ユーザー nobu
提出日時 2021-03-23 16:50:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 339 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-25 08:30:06
合計ジャッジ時間 2,298 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 36 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

m,p=map(int,input().split())
i=list(map(int,input().split()))
u=list(set(i))
#print(i)
#print(u)
u.sort(reverse=True)
a=0
l=0
m=[]
for w in u:
    if p < i.count(w) :
        print(0)
        break
    if p >= a:
        a += i.count(w)
        m.append(a)
        #print(a)
        l+=1

    if p < a:
        print(m[l-2])
        break
0