- 土拨鼠,上灯台
题解
- 2023-11-5 21:39:25 @
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,cnt=0;
cin>>n>>m;
int a[120];
for(int i=1;i<=n;i++){
cin>>a[i];
if(a[i]<=m){
cnt+=1;
}
}
if(cnt==0){
cout<<-1;
}
else{
cout<<cnt;
}
return 0;
}
0 comments
No comments so far...
Information
- ID
- 12
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 9
- Tags
- (None)
- # Submissions
- 12
- Accepted
- 6
- Uploaded By