AC

robin88  •  3个月前


include

using namespace std; / run this program using the console pauser or add your own getch, system("pause") or input loop /

int main(int argc, char** argv) {

int n=0,m=0,totalnum=0;
cin>>n;
int a[n]={0};
for(int i=0;i<n;i++){
	cin>>a[i];
}
cin>>m;
for(int i=0;i<m-1;i++){
	if(a[i]<a[m-1]){
		totalnum++;
	}
}
cout<<totalnum;
return 0;

}


评论:

请先登录,才能进行评论