結果
問題 | No.1380 Borderline |
ユーザー |
![]() |
提出日時 | 2022-11-17 16:48:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 1,714 ms |
コンパイル使用メモリ | 194,344 KB |
最終ジャッジ日時 | 2025-02-08 20:51:22 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 41 |
ソースコード
#include <bits/stdc++.h>using namespace std;const int MAX_SCORE = 400;int main() {int n, k;cin >> n >> k;vector<int> p(n);for (int& p_ : p) {cin >> p_;}int ans = 0;for (int score = 0; score <= MAX_SCORE; score++) {int count = 0;for (int& p_ : p)if (p_ >= score)count++;if (count <= k)ans = max(ans, count);}cout << ans << '\n';return 0;}