Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int tc,t=1,n,y,rx,ry,r,yx,yy,i,j;
  5. scanf("%d",&tc);
  6. while(tc--)
  7. {
  8. scanf("%d %d",&n,&y);
  9. for(i=0;i<n;i++)
  10. scanf("%d %d %d",&rx,&ry,&r);
  11.  
  12.  
  13. for(i=0;i<y;i++){
  14. scanf("%d %d",&yx,&yy);
  15.  
  16. if(yx<=r && yy<=r){
  17. printf("Case %d: ",t++);
  18. printf("Yes\n");
  19. }
  20. else
  21. {
  22.  
  23.  
  24. printf("Case %d: ",t++);
  25. printf("No\n");
  26. }
  27. }
  28.  
  29. }
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement