69622023-12-21 23:52:55999Völgy (100 pont)cpp17Wrong answer 15/10041ms4700 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;cin>>n;
	vector<int> v(n+1);
	for(int i = 1;i<=n;i++)
		cin>>v[i];
	int i=1,ans=-1;
	while(i<=n-2){
		int j=i+1;
		while(j<=n&&v[j]<v[i]){
			j++;
		}
		if(j-i>=2&&j!=n+1){
			ans=max(ans,j-i);
		}
		i=j;
	}
	cout<<-1<<endl;
}
SubtaskSumTestVerdictTimeMemory
base15/100
1Wrong answer0/03ms1812 KiB
2Wrong answer0/03ms2060 KiB
3Wrong answer0/53ms2416 KiB
4Wrong answer0/53ms2464 KiB
5Wrong answer0/53ms2992 KiB
6Wrong answer0/53ms2764 KiB
7Accepted5/53ms2880 KiB
8Wrong answer0/53ms2952 KiB
9Accepted5/53ms3044 KiB
10Wrong answer0/53ms3060 KiB
11Wrong answer0/54ms3436 KiB
12Wrong answer0/54ms3448 KiB
13Wrong answer0/56ms3444 KiB
14Wrong answer0/56ms3276 KiB
15Wrong answer0/534ms4096 KiB
16Wrong answer0/537ms4188 KiB
17Accepted5/537ms4328 KiB
18Wrong answer0/537ms4560 KiB
19Wrong answer0/535ms4416 KiB
20Wrong answer0/539ms4644 KiB
21Wrong answer0/541ms4508 KiB
22Wrong answer0/541ms4700 KiB