143302025-01-10 16:08:42bzyProgramtermék verseny (70 pont)cpp17Wrong answer 27/7035ms804 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll  long long

int main()
{
    int n, k; cin >> n >> k;
    vector <int> P(n+1);
    for(int i = 1; i <= n; i++) cin >> P[i];
    int own = P[k];
    int more = 0;
    for(int i = 1; i <= n; i++)
    {
        if(P[i] > own) more++;
        if(more == n/12) cout << i-1 << "\n";
        else if(more == n/4) cout << i-1 << "\n";
        else if(more == n/2) cout << i-1 << "\n";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base27/70
1Accepted0/01ms316 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/035ms564 KiB
4Wrong answer0/31ms316 KiB
5Wrong answer0/31ms508 KiB
6Wrong answer0/31ms392 KiB
7Wrong answer0/31ms344 KiB
8Wrong answer0/31ms508 KiB
9Wrong answer0/31ms332 KiB
10Wrong answer0/32ms500 KiB
11Wrong answer0/31ms316 KiB
12Accepted3/32ms328 KiB
13Wrong answer0/32ms508 KiB
14Wrong answer0/42ms316 KiB
15Wrong answer0/417ms608 KiB
16Accepted4/421ms564 KiB
17Accepted4/425ms564 KiB
18Wrong answer0/44ms628 KiB
19Accepted4/47ms332 KiB
20Wrong answer0/410ms516 KiB
21Accepted4/435ms804 KiB
22Accepted4/435ms800 KiB
23Accepted4/432ms756 KiB