15082022-11-21 15:39:40teodorbatkaiVölgy (100 pont)cpp11Wrong answer 0/100277ms5272 KiB
#include <bits/stdc++.h>

using namespace std;

int main(){
    int n, maxv = 0;

    cin >> n;

    vector<int> a(n);

    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    
    for(int i = 0; i < n; i++){
        if(a[i+1] < a[i]){
            int j = i;
            while(true){
                j++;
                if(a[j] >= a[i]){
                    if(j-i > maxv){
                        maxv = j-i;
                    }
                    break;
                }
            }
        }
    }
    cout << maxv-1 << endl;    
}
SubtaskSumTestVerdictTimeMemory
base0/100
1Wrong answer0/03ms1812 KiB
2Wrong answer0/02ms2208 KiB
3Wrong answer0/52ms2268 KiB
4Wrong answer0/52ms2472 KiB
5Wrong answer0/52ms2676 KiB
6Wrong answer0/52ms2880 KiB
7Wrong answer0/52ms2940 KiB
8Runtime error0/52ms2940 KiB
9Wrong answer0/53ms3120 KiB
10Runtime error0/53ms3436 KiB
11Runtime error0/54ms3624 KiB
12Wrong answer0/54ms3796 KiB
13Wrong answer0/54ms3876 KiB
14Runtime error0/56ms4056 KiB
15Runtime error0/532ms5020 KiB
16Runtime error0/535ms5172 KiB
17Runtime error0/534ms5248 KiB
18Runtime error0/534ms5272 KiB
19Time limit exceeded0/5273ms4156 KiB
20Time limit exceeded0/5261ms4124 KiB
21Time limit exceeded0/5277ms4168 KiB
22Time limit exceeded0/5241ms4264 KiB