結果
問題 | No.1380 Borderline |
ユーザー |
![]() |
提出日時 | 2021-02-07 20:31:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 369 bytes |
コンパイル時間 | 2,101 ms |
コンパイル使用メモリ | 192,916 KB |
最終ジャッジ日時 | 2025-01-18 13:51:25 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 41 |
ソースコード
#include <stdio.h>#include <bits/stdc++.h>using namespace std;#define rep(i,n) for (int i = 0; i < (n); ++i)#define Inf 1000000001int main(){int N,K;cin>>N>>K;vector<int> p(N);rep(i,N){cin>>p[i];}int ans = 0;rep(i,500){int t = 0;rep(j,N){if(p[j] >= i)t++;}if(t <= K)ans = max(ans,t);}cout<<ans<<endl;return 0;}