132522025-01-07 10:56:40MezeiDavidVölgy (100 pont)cpp17Wrong answer 35/100300ms800 KiB
#include <iostream>
#include<vector>

using namespace std;

int main()
{
    int n;
    int hossz =0;
    int j;
    int kezd;
    cin >> n;
    vector <int> meresek(n);
    for(int i=0; i< n; i++){
        cin >> meresek[i];
    }
    for(int i=0; i<n-2; i++){
            j=i+1;
        while(j<n&&meresek[i] > meresek[j]){
            j++;
        }
        if(hossz< j-i){
            hossz = j-i;
        }
    }if(hossz == 0 || hossz ==2){
        cout << -1;
    }else
    cout << hossz;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base35/100
1Accepted0/01ms500 KiB
2Wrong answer0/01ms508 KiB
3Wrong answer0/51ms316 KiB
4Accepted5/51ms500 KiB
5Wrong answer0/51ms316 KiB
6Wrong answer0/51ms508 KiB
7Wrong answer0/51ms316 KiB
8Accepted5/51ms316 KiB
9Wrong answer0/52ms316 KiB
10Wrong answer0/51ms320 KiB
11Accepted5/53ms432 KiB
12Accepted5/53ms452 KiB
13Wrong answer0/54ms392 KiB
14Wrong answer0/54ms340 KiB
15Accepted5/529ms564 KiB
16Accepted5/535ms800 KiB
17Time limit exceeded0/5300ms564 KiB
18Accepted5/532ms640 KiB
19Time limit exceeded0/5284ms576 KiB
20Time limit exceeded0/5287ms564 KiB
21Time limit exceeded0/5300ms564 KiB
22Time limit exceeded0/5286ms564 KiB