Saturday, June 6, 2015

LightOJ - 1107 - How Cow

  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5.     int x1, x2, y1, y2, a, b, n, t, cs = 0;
  6.     cin >> t;
  7.     while(t--){
  8.         cin >> x1 >> y1 >> x2 >> y2;
  9.         cin >> n;
  10.         cout << "Case " << ++cs << ":" << endl;;
  11.         while(n--){
  12.             cin >> a >> b;
  13.             if((>= x1 && a <= x2) && (>= y1 && b <= y2))puts("Yes");
  14.             else puts("No");
  15.         }
  16.     }
  17.     return 0;
  18. }

No comments:

Post a Comment