Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main (){
- int n,i,j,sum=0,tanda,tot,tow,dam,sisa,j1;
- scanf("%d",&n);
- for(i=0;i<n;i++)
- {
- scanf("%d%d%d", &tot, &tow,&dam);
- int arr[n];
- // sisa= tot%3;
- for(j=1;j<=tot;j++)
- {
- scanf("%d",&arr[j]);
- sum+=(arr[j]/dam);
- if( (arr[j]%dam) == 0) sum--;
- }
- if(sum>=tow)
- {
- printf("YES\n");
- } else printf("NO\n");
- sum=0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement