#include<stdio.h>
int main()
{
int t,n,m,D,count,i,H;
scanf("%d",&t);
while(t--)
{
scanf("%d%d%d",&n,&m,&D);
count=0;
while(n--)
{
scanf("%d",&H);
if (H>D)
{
while(H>0)
{
H=H-D;
count++;
}
count--;
}
}
if (count<m)
printf("NO\n");
else
printf("YES\n");
}
return 0;
}
int main()
{
int t,n,m,D,count,i,H;
scanf("%d",&t);
while(t--)
{
scanf("%d%d%d",&n,&m,&D);
count=0;
while(n--)
{
scanf("%d",&H);
if (H>D)
{
while(H>0)
{
H=H-D;
count++;
}
count--;
}
}
if (count<m)
printf("NO\n");
else
printf("YES\n");
}
return 0;
}
No comments:
Post a Comment