結果
問題 | No.1380 Borderline |
ユーザー |
![]() |
提出日時 | 2021-02-23 11:01:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 366 bytes |
コンパイル時間 | 673 ms |
コンパイル使用メモリ | 68,688 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 07:01:09 |
合計ジャッジ時間 | 2,071 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 41 |
ソースコード
#include <iostream>#include <vector>using namespace std;int main(){int n,k,ans=0;cin>>n>>k;vector<int> p(n);for(int i=0;i<n;i++) cin>>p[i];for(int b=0;b<=400;b++){int cur=0;for(int i=0;i<n;i++){if(p[i]>=b) cur++;}if(cur<=k) ans=max(ans,cur);}cout<<ans<<endl;return 0;}