42062023-03-16 13:50:44KristófProgramtermék verseny (70 pont)cpp11Wrong answer 0/7037ms5084 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];
    int a=0;
    int b=0;
    int e=0;

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

    int bendeguz=pontok[bs];
    int db;

    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
base0/70
1Wrong answer0/03ms1872 KiB
2Wrong answer0/03ms2124 KiB
3Wrong answer0/037ms2924 KiB
4Wrong answer0/33ms2388 KiB
5Wrong answer0/33ms2628 KiB
6Wrong answer0/33ms2808 KiB
7Wrong answer0/33ms2912 KiB
8Wrong answer0/33ms2916 KiB
9Wrong answer0/33ms3012 KiB
10Wrong answer0/33ms3224 KiB
11Wrong answer0/33ms3480 KiB
12Wrong answer0/33ms3528 KiB
13Wrong answer0/33ms3684 KiB
14Wrong answer0/44ms3688 KiB
15Wrong answer0/419ms3996 KiB
16Wrong answer0/423ms4420 KiB
17Wrong answer0/427ms4420 KiB
18Wrong answer0/46ms4024 KiB
19Wrong answer0/48ms4396 KiB
20Wrong answer0/412ms4312 KiB
21Wrong answer0/437ms4972 KiB
22Wrong answer0/437ms5084 KiB
23Wrong answer0/432ms4880 KiB