112762024-08-03 20:07:02bzyLegcsalódottabb versenyző (75 pont)cpp14Wrong answer 35/7535ms884 KiB
#include <bits/stdc++.h>

using namespace std;
int main()
{
	int n;
	cin>>n;
	vector<int> P(n);
	for(auto& p:P){
		cin>>p;	
	} 
	int ans = -1; int biggest=0;
	for(int i = 0;i<n-1;i++){
		for(int j = i+1;j<n;j++){
			if(P[j] > P[i]){
				if(j-i>biggest){
					biggest = j-i;
					ans = i+1;
					i = j;
				}
				break;
			}
		}
	}
	cout<<ans<<endl;
}
SubtaskSumTestVerdictTimeMemory
base35/75
1Accepted0/03ms356 KiB
2Wrong answer0/035ms820 KiB
3Accepted5/53ms396 KiB
4Accepted5/53ms484 KiB
5Accepted5/52ms256 KiB
6Accepted5/52ms360 KiB
7Wrong answer0/53ms376 KiB
8Wrong answer0/53ms228 KiB
9Accepted5/53ms504 KiB
10Wrong answer0/53ms384 KiB
11Accepted5/53ms504 KiB
12Wrong answer0/53ms376 KiB
13Accepted5/535ms740 KiB
14Wrong answer0/535ms884 KiB
15Wrong answer0/535ms760 KiB
16Wrong answer0/535ms760 KiB
17Wrong answer0/535ms868 KiB