136872025-01-08 12:39:03MezeiDavidProgramtermék verseny (70 pont)cpp17Wrong answer 3/7037ms1428 KiB
#include <iostream>
#include<vector>

using namespace std;

int main()
{
    bool he = true;
    int n, m, b, sz=0;
    cin >> n >> m;
    int a=n/12, e=n/4,br=n/2;

    vector<int>c(n);
    for(int i=0; i<n; i++){
       cin >>c[i];
    }
    b = c[m-1];

    for(int i=0; i<n; i++){
        if(c[i]>b){
                sz++;
            if(sz==a){
                if(i > m){
                    cout << i << endl;
                }
            }
        }
    }
        if(sz < a){
        cout << n<< endl;
        he = false;}else{
        cout << 0 << endl;}
        sz = 0;
        for(int i=0; i<n; i++){
        if(c[i]>b){
                sz++;
            if(sz==e){
                if(i  > m){
                    cout << i << endl;
                }
            }
        }
    }
    if(sz < e && he){
        cout << n << endl;
        he = false;
    }else{
    cout << 0;}
    sz =0;
     for(int i=0; i<n; i++){
        if(c[i]>b){
                sz++;
            if(sz==br){
                if(i > m){
                    cout << i;
                }
            }
        }
    }    if(sz < br&& he)
        cout << n;
        else{
            cout << 0;
        }
    //cout << a << e << br;
    return 0;
}
//12 3
// 1 2 20 5 21 22 26 27 23 28 24 25
SubtaskSumTestVerdictTimeMemory
base3/70
1Wrong answer0/01ms316 KiB
2Accepted0/01ms316 KiB
3Wrong answer0/037ms1332 KiB
4Wrong answer0/31ms316 KiB
5Wrong answer0/31ms316 KiB
6Accepted3/31ms404 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms508 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/31ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/32ms416 KiB
13Wrong answer0/32ms316 KiB
14Wrong answer0/42ms316 KiB
15Wrong answer0/418ms848 KiB
16Wrong answer0/421ms820 KiB
17Wrong answer0/427ms1060 KiB
18Wrong answer0/44ms316 KiB
19Wrong answer0/48ms416 KiB
20Wrong answer0/410ms628 KiB
21Wrong answer0/437ms1428 KiB
22Wrong answer0/437ms1316 KiB
23Wrong answer0/432ms1332 KiB