127882024-12-30 17:54:02sarminLegcsalódottabb versenyző (75 pont)cpp17Accepted 75/7534ms808 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {

	int n; cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}

	int left = 0, right = 1, maxima = 0, ans = -1;
	while (right < n) {
		if (a[left] < a[right]) {
			if (maxima < right - left) {
				maxima = right - left;
				ans = left + 1;
			}
			left = right;
		}
		right++;
	}
	cout << ans;
	
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/01ms320 KiB
2Accepted0/034ms568 KiB
3Accepted5/51ms332 KiB
4Accepted5/51ms320 KiB
5Accepted5/51ms320 KiB
6Accepted5/51ms500 KiB
7Accepted5/51ms320 KiB
8Accepted5/52ms320 KiB
9Accepted5/51ms500 KiB
10Accepted5/51ms508 KiB
11Accepted5/51ms320 KiB
12Accepted5/51ms508 KiB
13Accepted5/532ms804 KiB
14Accepted5/532ms804 KiB
15Accepted5/532ms568 KiB
16Accepted5/532ms808 KiB
17Accepted5/534ms568 KiB