49812023-04-08 13:16:38Laci3000Völgy (100 pont)cpp11Wrong answer 5/100300ms5280 KiB
#include <iostream>
#include <vector>


using namespace std;

vector<int> beolvasas() {
    int sorok_szama;
    cin >> sorok_szama;

    vector<int> beolvasottak(sorok_szama);

    for (int i = 0; i < sorok_szama; i++)
    {
        cin >> beolvasottak[i];
    }


    return beolvasottak;
}

int feldolgozas(vector<int> t, int hely) {
    int a = 1;
    int ertek = t[hely];
    for (int i = hely; i < t.size(); i++)
    {
        if (ertek > t[i + 1]) {
            a++;
        }
        else {
            a++;
            break;
        }
    }
    return a;
}

int befejezes(vector<int> lista) {
    vector<int> maximumkereso(lista.size() - 1);
    for (int i = 0; i < lista.size() - 1; i++)
    {
        maximumkereso[i] = feldolgozas(lista, i);

    }int a = maximumkereso[0];
    for (int i = 1; i < maximumkereso.size(); i++)
    {
        if (a < maximumkereso[i]) {
            a = maximumkereso[i];
        }
    }
    if (a <= 3) {
        a = -1;
    }
   
    return a;
}

int main()
{
    vector<int> adatok = beolvasas();
    cout << befejezes(adatok);
}
SubtaskSumTestVerdictTimeMemory
base5/100
1Wrong answer0/03ms1812 KiB
2Wrong answer0/03ms2012 KiB
3Wrong answer0/53ms2216 KiB
4Wrong answer0/53ms2424 KiB
5Wrong answer0/53ms2792 KiB
6Wrong answer0/53ms2864 KiB
7Accepted5/53ms3096 KiB
8Wrong answer0/53ms3212 KiB
9Wrong answer0/53ms3340 KiB
10Wrong answer0/53ms3340 KiB
11Wrong answer0/59ms3656 KiB
12Wrong answer0/526ms3820 KiB
13Wrong answer0/526ms3936 KiB
14Wrong answer0/525ms4096 KiB
15Time limit exceeded0/5300ms4536 KiB
16Time limit exceeded0/5275ms4624 KiB
17Time limit exceeded0/5256ms4932 KiB
18Time limit exceeded0/5275ms5036 KiB
19Time limit exceeded0/5282ms4972 KiB
20Time limit exceeded0/5259ms4964 KiB
21Time limit exceeded0/5263ms5280 KiB
22Time limit exceeded0/5252ms5220 KiB