Advertisement
erfanul007

UVa 11498

Nov 20th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int k,n,m,x,y,i;
  5. while(1){
  6. scanf("%d",&k);
  7. if(k==0)
  8. break;
  9. scanf("%d %d",&n,&m);
  10. for(i=1;i<=k;i++){
  11. scanf("%d %d",&x,&y);
  12. if(x==n || y==m)
  13. printf("divisa\n");
  14. else if(x<n){
  15. if(y>m)
  16. printf("NO\n");
  17. else
  18. printf("SO\n");
  19. }
  20. else{
  21. if(y>m)
  22. printf("NE\n");
  23. else
  24. printf("SE\n");
  25. }
  26. }
  27. }
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement