30332023-02-08 18:58:01xxxVölgy (100 pont)cpp11Wrong answer 80/10037ms4660 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 (cntmax < 2) cout << -1;
    else cout << cntmax;
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base80/100
1Accepted0/03ms1876 KiB
2Wrong answer0/03ms2120 KiB
3Accepted5/53ms2280 KiB
4Accepted5/53ms2388 KiB
5Wrong answer0/53ms2640 KiB
6Wrong answer0/53ms2708 KiB
7Accepted5/53ms2928 KiB
8Accepted5/53ms3132 KiB
9Accepted5/53ms3376 KiB
10Wrong answer0/53ms3492 KiB
11Accepted5/54ms3616 KiB
12Accepted5/54ms3708 KiB
13Accepted5/54ms3920 KiB
14Wrong answer0/56ms4008 KiB
15Accepted5/529ms4004 KiB
16Accepted5/534ms4032 KiB
17Accepted5/534ms4236 KiB
18Accepted5/534ms4256 KiB
19Accepted5/534ms4464 KiB
20Accepted5/537ms4460 KiB
21Accepted5/537ms4604 KiB
22Accepted5/537ms4660 KiB