結果
| 問題 | No.1380 Borderline |
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-02-07 20:31:23 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 369 bytes |
| 記録 | |
| コンパイル時間 | 1,217 ms |
| コンパイル使用メモリ | 210,932 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-17 16:04:03 |
| 合計ジャッジ時間 | 2,585 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 1000000001
int 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;
}
沙耶花