fork download
  1. #include<stdio.h>
  2. int main(){
  3. int n,c,t,k,a[100];
  4. // long unsigned int candy;
  5. unsigned long long candy;
  6. scanf("%d",&t);
  7. for(;t>0;t--) {
  8. c = 0;
  9. printf("DEBUG t : %d\n",t);
  10. scanf("%d %llu",&n,&candy);
  11. printf("DEBUG t : %d\n",t);
  12. for(k=0;k<n;k++) {
  13. printf("DEBUG t : %d\n",t);
  14. scanf("%d",&a[k]);
  15. c=c+a[k];
  16. }
  17. if(candy<c) printf("No\n");
  18. else printf("Yes\n");
  19. printf("DEBUG t : %d\n",t);
  20. }
  21. return 0;
  22. }
Success #stdin #stdout 0s 2732KB
stdin
2
2 3
1 1
3 7
4 2 2
stdout
DEBUG t : 2
DEBUG t : 2
DEBUG t : 2
DEBUG t : 2
Yes
DEBUG t : 2
DEBUG t : 1
DEBUG t : 1
DEBUG t : 1
DEBUG t : 1
DEBUG t : 1
No
DEBUG t : 1