結果

問題 No.1380 Borderline
ユーザー warm4C0warm4C0
提出日時 2021-09-19 18:58:05
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 462 bytes
コンパイル時間 1,375 ms
コンパイル使用メモリ 164,692 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-14 15:39:40
合計ジャッジ時間 3,518 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 WA -
testcase_05 AC 1 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
4,380 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 WA -
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 WA -
testcase_24 AC 2 ms
4,376 KB
testcase_25 WA -
testcase_26 AC 1 ms
4,380 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 1 ms
4,380 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 1 ms
4,376 KB
testcase_34 WA -
testcase_35 AC 1 ms
4,376 KB
testcase_36 WA -
testcase_37 AC 2 ms
4,376 KB
testcase_38 WA -
testcase_39 AC 1 ms
4,376 KB
testcase_40 AC 1 ms
4,376 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 2 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main() {
    int n, k;
    cin >> n >> k;

    int p[n];
    for (int i = 0; i < n; i++) {
        cin >> p[i];
    }

    for (int b = 0; b < n; b++) {
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            cnt += b <= p[i];
        }
        if (cnt <= k) {
            cout << cnt << endl;
            return 0;
        }
    }

    cout << 0 << endl;

    return 0;
}
0