initial commit
This commit is contained in:
parent
bede1a87ef
commit
5a8c2924b1
21
158A-NextRound/158A.cpp
Normal file
21
158A-NextRound/158A.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include <bits/stdc++.h>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int i, j, n, k, count=0;
|
||||
cin >> n >> k;
|
||||
int s[n];
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
cin >> s[i];
|
||||
}
|
||||
for(i=0;i<n;i++)
|
||||
{
|
||||
if (s[i] > 0 && s[i]>=s[k-1])
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
cout << count;
|
||||
}
|
Loading…
Reference in New Issue
Block a user