38272023-03-03 10:33:31DalmaVölgy (100 pont)cpp17Wrong answer 60/10037ms5408 KiB
#include <iostream>

using namespace std;

int main()
{
    int hosszusag;
    cin >> hosszusag;
    int meterek[hosszusag];
    for (int i=0; i<hosszusag; i++)
    {
        cin >> meterek[i];
    }
    int volgy=0;
    int ujvolgy=0;
    int mero=0;
    for (int i=0; i<hosszusag; i++)
    {
        if (meterek[i]>=mero)
        {
            mero=meterek[i];
            ujvolgy=1;
        }
        else
        {
            ujvolgy++;
        }
        if (ujvolgy>volgy)
        {
            volgy=ujvolgy;
        }
    }
    cout << volgy << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/100
1Accepted0/03ms1748 KiB
2Wrong answer0/03ms1988 KiB
3Accepted5/53ms2204 KiB
4Accepted5/52ms2420 KiB
5Wrong answer0/52ms2656 KiB
6Wrong answer0/52ms2640 KiB
7Wrong answer0/53ms2780 KiB
8Accepted5/52ms2992 KiB
9Wrong answer0/53ms3192 KiB
10Wrong answer0/53ms3396 KiB
11Accepted5/54ms3628 KiB
12Accepted5/54ms3856 KiB
13Wrong answer0/54ms4200 KiB
14Wrong answer0/56ms4284 KiB
15Accepted5/529ms5088 KiB
16Accepted5/535ms5012 KiB
17Wrong answer0/534ms5016 KiB
18Accepted5/534ms5164 KiB
19Accepted5/534ms5248 KiB
20Accepted5/537ms5224 KiB
21Accepted5/537ms5376 KiB
22Accepted5/537ms5408 KiB