Advertisement
ProgMe

Untitled

Mar 31st, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int t;
  8. cin >> t;
  9. while(t--)
  10. {
  11. int a, b, c, d;
  12. cin >> a >> b >> c >> d;
  13. int x, y, x1, y1, x2, y2;
  14. cin >> x >> y >> x1 >> y1 >> x2 >> y2;
  15. a -= min(x2 - x, b);
  16. c -= min(y2 - y, d);
  17. if (x2 - a < x1 || y2 - c < y1)
  18. cout << "NO\n";
  19. else
  20. cout << "YES\n";
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement