42042023-03-16 13:42:52KristófProgramtermék verseny (70 pont)cpp11Wrong answer 0/7037ms5292 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 b=n;
    int e=n;

    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==n)
    b==0;
e==0;
if(a<bs)
a=0;
cout<<a<<endl;
if(e<bs)
    e=0;
    if(e==n)
        b=0;
cout<<e<<endl;
if(b<bs)
    b=0;
cout<<b<<endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/70
1Wrong answer0/03ms1880 KiB
2Wrong answer0/03ms1948 KiB
3Wrong answer0/037ms2928 KiB
4Wrong answer0/33ms2368 KiB
5Wrong answer0/33ms2492 KiB
6Wrong answer0/33ms2624 KiB
7Wrong answer0/33ms2704 KiB
8Wrong answer0/33ms2948 KiB
9Wrong answer0/33ms3036 KiB
10Wrong answer0/33ms3156 KiB
11Wrong answer0/33ms3352 KiB
12Wrong answer0/33ms3420 KiB
13Wrong answer0/34ms3660 KiB
14Wrong answer0/44ms3852 KiB
15Wrong answer0/419ms4232 KiB
16Wrong answer0/423ms4328 KiB
17Wrong answer0/427ms4440 KiB
18Wrong answer0/46ms3928 KiB
19Wrong answer0/48ms4220 KiB
20Wrong answer0/413ms4216 KiB
21Wrong answer0/437ms4876 KiB
22Wrong answer0/437ms5124 KiB
23Wrong answer0/432ms5292 KiB