結果
| 問題 | 
                            No.1380 Borderline
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Ultimate_Tea_04
                         | 
                    
| 提出日時 | 2021-02-07 21:30:34 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 297 bytes | 
| コンパイル時間 | 316 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-07-04 14:48:21 | 
| 合計ジャッジ時間 | 2,755 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 WA * 1 | 
| other | AC * 40 WA * 1 | 
ソースコード
import collections as c
n,k = map(int,input().split())
p = list(map(int,input().split()))
ans = 0
for i in reversed(range(0,max(p))):
    b = i
    cnt = 0
    for j in range(n):
        if p[j]>=b:
            cnt += 1
    if cnt<=k:
        ans = max(ans,cnt)
    else:
        break
print(ans)
            
            
            
        
            
Ultimate_Tea_04