啊这
查看原帖
啊这
301765
ElfOfEra楼主2020/6/13 14:21
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
	int fish,cute[101],a,i,m;
	cin>>fish;
	for(a=1;a<=fish;a++){
		cin>>cute[a];
	}
	for(a=1;a<=fish;a++){
		m=0;
		for(i=a;i>=1;i--){
			if(cute[i]>cute[i-1]){
				m++;
			}
		}	
		cout<<m<<" ";
	}
	return 0;
}

PS C:\Users\5203> cd "y:\信息学资料\CSP\新建文件夹\" ; if ($?) { g++ P1428.cpp -o P1428 } ; if ($?) { .\P1428 }
6
4 3 0 5 1 2
0 0 0 1 1 2 
2020/6/13 14:21
加载中...