結果
| 問題 | No.1380 Borderline |
| コンテスト | |
| ユーザー |
chacoder1
|
| 提出日時 | 2021-02-07 20:34:58 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 390 bytes |
| 記録 | |
| コンパイル時間 | 1,307 ms |
| コンパイル使用メモリ | 210,240 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-17 16:06:51 |
| 合計ジャッジ時間 | 2,476 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 41 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<n;i++)
int main(){
int n,t;
cin>>n>>t;
int p[n];
rep(i,n) cin>>p[i];
int maxans=0;
int cnt;
for(int i=0;i<=400;i++){
cnt=0;
for(int j=0;j<n;j++){
if(p[j]>=i) cnt++;
}
if(cnt<=t){
maxans=max(maxans,cnt);
}
}
cout<<maxans<<endl;
return 0;
}
chacoder1