30342023-02-08 19:04:06xxxVölgy (100 pont)cpp11Wrong answer 65/10039ms3992 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    int a;
    int volgymax = 0, cnt = 0, cntmax = 0;
    for (int i =0; i < n; i++) {
        cin >> a;
        if (a >= volgymax) {
            volgymax = a;
            if (cnt > cntmax) cntmax = cnt;
            cnt = 1;
        } else {
            cnt++;
        }
    }
    if (cnt > cntmax) cntmax = cnt - 1;
    if (cntmax < 2) cout << -1;
    else cout << cntmax;
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base65/100
1Accepted0/03ms1880 KiB
2Wrong answer0/03ms2124 KiB
3Accepted5/53ms2328 KiB
4Accepted5/52ms2412 KiB
5Wrong answer0/53ms2608 KiB
6Wrong answer0/53ms2820 KiB
7Accepted5/53ms3180 KiB
8Accepted5/53ms3340 KiB
9Wrong answer0/53ms3468 KiB
10Wrong answer0/53ms3684 KiB
11Accepted5/54ms3640 KiB
12Accepted5/54ms3744 KiB
13Wrong answer0/54ms3648 KiB
14Wrong answer0/56ms3644 KiB
15Accepted5/529ms3644 KiB
16Accepted5/534ms3676 KiB
17Wrong answer0/534ms3744 KiB
18Accepted5/534ms3744 KiB
19Accepted5/535ms3868 KiB
20Accepted5/537ms3872 KiB
21Accepted5/539ms3976 KiB
22Accepted5/537ms3992 KiB