AC

哈基米  •  12天前


include <bits/stdc++.h>

using namespace std;

int main() {

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

}


评论:

请先登录,才能进行评论