10172022-02-24 19:26:22Kevinke12Völgy (100 pont)cpp14Wrong answer 60/10034ms8036 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long


int N, be1;
vector<int> a;

int main()
{
    cin >> N;
    for(int i = 0; i < N; i++)
    {
        cin >> be1;
        a.push_back(be1);
    }

    int ans=-1;
    //Megoldás
    for(int i = 0; i < N; i++)
    {
        int veg=i+1;
        while((veg<N) && (a[veg]<a[i])) //Fordítva futási 11
        {
            veg++;
        }
        ans = max(ans, veg-i);
        //cout << i << "-" << veg << "\n";

        i = veg-1;

    }
    cout << ans << "\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/100
1Accepted0/02ms1816 KiB
2Wrong answer0/02ms1864 KiB
3Accepted5/51ms1912 KiB
4Accepted5/51ms1916 KiB
5Wrong answer0/51ms1920 KiB
6Wrong answer0/51ms1920 KiB
7Wrong answer0/51ms1928 KiB
8Accepted5/51ms1932 KiB
9Wrong answer0/51ms1944 KiB
10Wrong answer0/52ms1968 KiB
11Accepted5/53ms2008 KiB
12Accepted5/53ms2104 KiB
13Wrong answer0/54ms2200 KiB
14Wrong answer0/54ms2300 KiB
15Accepted5/532ms3748 KiB
16Accepted5/528ms4268 KiB
17Wrong answer0/529ms4836 KiB
18Accepted5/530ms5408 KiB
19Accepted5/529ms6064 KiB
20Accepted5/532ms6716 KiB
21Accepted5/534ms7412 KiB
22Accepted5/534ms8036 KiB