46282023-03-30 13:06:08DalmProgramtermék verseny (70 pont)cpp11Wrong answer 0/7037ms4848 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=N;
    int e=N;
    int b=N;
    for(int i=1;i<=N;i++){
        cin>>pontok[i];
    }
    int bendeguz=pontok[bs];
    int db=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==N){
        b==0;
        e==0;
    }
    if(a<bs)
        a=0;
    cout<<a<<endl;
    if(a<bs)
        e=0;
    cout<<a<<endl;
    if(a<bs)
        b=0;
    cout<<a<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/70
1Wrong answer0/03ms1748 KiB
2Wrong answer0/03ms1992 KiB
3Wrong answer0/037ms2976 KiB
4Wrong answer0/33ms2336 KiB
5Wrong answer0/32ms2448 KiB
6Wrong answer0/33ms2688 KiB
7Wrong answer0/33ms2788 KiB
8Wrong answer0/33ms2864 KiB
9Wrong answer0/33ms2872 KiB
10Wrong answer0/33ms3092 KiB
11Wrong answer0/33ms3136 KiB
12Wrong answer0/33ms3136 KiB
13Wrong answer0/33ms3276 KiB
14Wrong answer0/44ms3492 KiB
15Wrong answer0/419ms3880 KiB
16Wrong answer0/424ms4176 KiB
17Wrong answer0/427ms4280 KiB
18Wrong answer0/46ms3792 KiB
19Wrong answer0/48ms4084 KiB
20Wrong answer0/412ms4072 KiB
21Wrong answer0/437ms4736 KiB
22Wrong answer0/437ms4848 KiB
23Wrong answer0/432ms4736 KiB