42072023-03-16 13:50:59Tibi23Programtermék verseny (70 pont)cpp11Wrong answer 27/7037ms4944 KiB
#include <iostream>

using namespace std;

int main()
{
    int N;
    int bs;
    cin>>N;
    cin>>bs;

    int arany = N/12;
    int ezust = N/4;
    int bronz =N/2;

    int pontok[N+1];
    for(int i=1; i<=N; i++){
        cin>>pontok[i];
    }
    int bendeguz = pontok[bs];
    int db = 0; //bendegúznál jobbak
    int a=0;
    int e=0;
    int b=0;
    for(int i=1; i<=N;i++){
        if(i==bs)
            continue;
        if(pontok[i]>bendeguz)
            db++;
        if(db == arany)
            a=i-1;
        if(db==ezust)
            e=i-1;
        if(db==bronz)
            b=i-1;

    }


    if(a<bs)
        a=0;
    cout<<a<<endl;

    if(e<bs)
        e=0;
    cout<<e<<endl;

    if(b<bs)
        b=0;
    cout<<b<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base27/70
1Accepted0/03ms1744 KiB
2Wrong answer0/03ms1912 KiB
3Wrong answer0/037ms2896 KiB
4Wrong answer0/33ms2368 KiB
5Wrong answer0/33ms2576 KiB
6Wrong answer0/33ms2668 KiB
7Wrong answer0/32ms2660 KiB
8Wrong answer0/32ms2628 KiB
9Wrong answer0/33ms2764 KiB
10Wrong answer0/33ms3020 KiB
11Wrong answer0/33ms3224 KiB
12Accepted3/33ms3276 KiB
13Wrong answer0/33ms3396 KiB
14Wrong answer0/44ms3536 KiB
15Wrong answer0/419ms3904 KiB
16Accepted4/423ms3832 KiB
17Accepted4/427ms4132 KiB
18Wrong answer0/46ms3744 KiB
19Accepted4/48ms3768 KiB
20Wrong answer0/413ms4064 KiB
21Accepted4/437ms4712 KiB
22Accepted4/437ms4944 KiB
23Accepted4/432ms4856 KiB