42052023-03-16 13:43:00DalmProgramtermék verseny (70 pont)cpp11Wrong answer 0/7037ms5300 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/03ms1872 KiB
2Wrong answer0/03ms2124 KiB
3Wrong answer0/037ms3104 KiB
4Wrong answer0/33ms2420 KiB
5Wrong answer0/33ms2548 KiB
6Wrong answer0/33ms2704 KiB
7Wrong answer0/33ms2916 KiB
8Wrong answer0/33ms3164 KiB
9Wrong answer0/33ms3248 KiB
10Wrong answer0/33ms3212 KiB
11Wrong answer0/33ms3332 KiB
12Wrong answer0/33ms3212 KiB
13Wrong answer0/34ms3488 KiB
14Wrong answer0/44ms3504 KiB
15Wrong answer0/419ms4152 KiB
16Wrong answer0/423ms4400 KiB
17Wrong answer0/427ms4520 KiB
18Wrong answer0/46ms4156 KiB
19Wrong answer0/48ms4540 KiB
20Wrong answer0/412ms4616 KiB
21Wrong answer0/437ms5276 KiB
22Wrong answer0/437ms5300 KiB
23Wrong answer0/432ms5136 KiB