48552023-04-02 19:42:44Laci3000Völgy (100 pont)cpp11Wrong answer 5/100280ms4752 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() - 1; i++)
    {
        if (ertek > t[i + 1]) {
            a++;
        }
        else {
            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 = -1;
    for (int i = 0; i < maximumkereso.size(); i++)
    {
        if (maximumkereso[i] >= 3 && maximumkereso[i] > a) {
            a = maximumkereso[i] - 1;
        }
    }

    return a;
}

int main()
{
    vector<int> adatok = beolvasas();
    cout << befejezes(adatok);
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/100
1Wrong answer0/03ms1812 KiB
2Wrong answer0/03ms2016 KiB
3Wrong answer0/53ms2220 KiB
4Wrong answer0/53ms2428 KiB
5Wrong answer0/53ms2636 KiB
6Wrong answer0/52ms2728 KiB
7Accepted5/53ms2964 KiB
8Wrong answer0/53ms2936 KiB
9Wrong answer0/53ms2952 KiB
10Wrong answer0/53ms3192 KiB
11Wrong answer0/59ms3220 KiB
12Wrong answer0/526ms3556 KiB
13Wrong answer0/526ms3768 KiB
14Wrong answer0/524ms3852 KiB
15Time limit exceeded0/5240ms4460 KiB
16Time limit exceeded0/5247ms4548 KiB
17Time limit exceeded0/5259ms4420 KiB
18Time limit exceeded0/5279ms4480 KiB
19Time limit exceeded0/5270ms4448 KiB
20Time limit exceeded0/5254ms4752 KiB
21Time limit exceeded0/5280ms4584 KiB
22Time limit exceeded0/5275ms4612 KiB