99我
查看原帖
99我
1034658
SUPERBOY114楼主2024/8/26 09:52
#include<bits/stdc++.h>
using namespace std;
int main(){
	long long a,b,max=0,max1=0,s=0;
	cin>>a;
	for(int i=1;i<=a;i++){
		cin>>b;
		if(b>max){
			max=b;
			s++;
		}
		if(b<max){
			if(s>max1){
				max=s;
			}
			s=0;
		}
	}
	cout<<s;
	return 0;
}

2024/8/26 09:52
加载中...