80772024-01-12 12:08:56David9320Programtermék verseny (70 pont)cpp17Wrong answer 0/7037ms5500 KiB
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

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

    vector<int> pontok(n);
    int helyezes = 1;
    int arany = 0;
    int ezust = 0;
    int bronz = 0;

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

    for(int i = 0; i < n; i++) {
        if(i == k - 1) {
            continue;
        }
        if(pontok[i] >= pontok[k]) {
            helyezes++;
        }
        if(helyezes <= n / 12) {
            arany = i + 1;
        } else if(helyezes <= n / 4) {
            ezust = i + 1;
        } else if(helyezes <= n / 2) {
            bronz = i + 1;
        }
    }

    if(arany == n) {
        cout << "N" << endl;
    } else {
        cout << arany << endl;
    }
    if(ezust == n) {
        cout << "N" << endl;
    } else {
        cout << ezust << endl;
    }
    if(bronz== n) {
        cout << "N" << endl;
    } else {
        cout << bronz << endl;
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/70
1Wrong answer0/03ms1680 KiB
2Wrong answer0/03ms1992 KiB
3Wrong answer0/037ms2784 KiB
4Wrong answer0/33ms2288 KiB
5Wrong answer0/33ms2536 KiB
6Wrong answer0/33ms2724 KiB
7Wrong answer0/33ms3080 KiB
8Wrong answer0/33ms3140 KiB
9Wrong answer0/33ms3496 KiB
10Wrong answer0/33ms3548 KiB
11Wrong answer0/33ms3784 KiB
12Wrong answer0/33ms4012 KiB
13Wrong answer0/33ms4224 KiB
14Wrong answer0/44ms4296 KiB
15Wrong answer0/419ms4448 KiB
16Wrong answer0/423ms4448 KiB
17Wrong answer0/427ms4576 KiB
18Wrong answer0/46ms4492 KiB
19Wrong answer0/48ms4528 KiB
20Wrong answer0/412ms4572 KiB
21Wrong answer0/437ms5288 KiB
22Wrong answer0/437ms5500 KiB
23Wrong answer0/432ms5476 KiB