112772024-08-03 20:16:32bzyLegcsalódottabb versenyző (75 pont)cpp14Wrong answer 45/7535ms784 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=-1;
	for(int i = 0;i<n;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-1;
				break;
			}
		}
	}
	cout<<ans<<endl;
}
SubtaskSumTestVerdictTimeMemory
base45/75
1Accepted0/03ms356 KiB
2Wrong answer0/035ms784 KiB
3Accepted5/53ms356 KiB
4Accepted5/53ms356 KiB
5Accepted5/52ms256 KiB
6Accepted5/52ms256 KiB
7Wrong answer0/52ms228 KiB
8Accepted5/53ms256 KiB
9Accepted5/53ms356 KiB
10Wrong answer0/53ms224 KiB
11Accepted5/53ms356 KiB
12Accepted5/53ms356 KiB
13Accepted5/534ms612 KiB
14Wrong answer0/535ms672 KiB
15Wrong answer0/534ms740 KiB
16Wrong answer0/534ms740 KiB
17Wrong answer0/535ms764 KiB