112702024-08-03 12:28:44bzyLegcsalódottabb versenyző (75 pont)cpp14Wrong answer 45/7537ms1016 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 l=0; int r=1; int ans = -1; int current = 0;
	while(r<n){
		if(P[r]>P[l]){
			current += r-l;
			ans = l+1;
			l=r;
		}
		r++;
	}
	cout<<ans<<endl;
}
SubtaskSumTestVerdictTimeMemory
base45/75
1Accepted0/03ms640 KiB
2Wrong answer0/037ms800 KiB
3Accepted5/53ms392 KiB
4Accepted5/53ms500 KiB
5Accepted5/52ms384 KiB
6Wrong answer0/52ms256 KiB
7Accepted5/53ms228 KiB
8Accepted5/52ms376 KiB
9Wrong answer0/53ms504 KiB
10Wrong answer0/53ms504 KiB
11Wrong answer0/53ms400 KiB
12Accepted5/53ms384 KiB
13Accepted5/537ms760 KiB
14Accepted5/537ms740 KiB
15Wrong answer0/537ms740 KiB
16Wrong answer0/537ms760 KiB
17Accepted5/537ms1016 KiB