2017 JUST Programming Contest 3.0 K. Malek and Summer Semester
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
#define ll long long
const int maxn=100005;
int a[105];
int main()
{
// freopen("in.txt","r",stdin);
int T,n;
double m;
scanf("%d",&T);
while(T--)
{
scanf("%d%lf",&n,&m);
double guo=n*m;
int guo1=ceil(guo);
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
int ans=0;
for(int i=0;i<n;i++)
{
if(a[i]>=50)
ans++;
}
if(ans>=guo1)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
}