70492023-12-28 22:15:23IgnácVölgy (100 pont)cpp17Wrong answer 80/10039ms4404 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	int kezdi = -1, kezdh = 0, maximum = 1;
	for (int i = 0; i < n; i++) {
		int a;
		cin >> a;
		if (a >= kezdh) {
			maximum = max(maximum, i - kezdi);
			kezdi = i;
			kezdh = a;
		}
	}

	if (maximum == 1) cout << -1;
	else cout << maximum;
}
SubtaskSumTestVerdictTimeMemory
base80/100
1Accepted0/03ms1880 KiB
2Wrong answer0/03ms2112 KiB
3Accepted5/53ms2324 KiB
4Accepted5/53ms2532 KiB
5Wrong answer0/52ms2576 KiB
6Wrong answer0/52ms2576 KiB
7Accepted5/53ms2704 KiB
8Accepted5/53ms2912 KiB
9Accepted5/53ms3004 KiB
10Wrong answer0/53ms3004 KiB
11Accepted5/54ms3240 KiB
12Accepted5/54ms3452 KiB
13Accepted5/56ms3668 KiB
14Wrong answer0/56ms3744 KiB
15Accepted5/534ms3876 KiB
16Accepted5/535ms3848 KiB
17Accepted5/535ms3976 KiB
18Accepted5/535ms4060 KiB
19Accepted5/535ms4192 KiB
20Accepted5/539ms4300 KiB
21Accepted5/539ms4404 KiB
22Accepted5/539ms4400 KiB