Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. bool hit = 0;
  7. int R, x, y;
  8.  
  9. cin >> R; cin >> x; cin >> y;
  10.  
  11. if (-R <= x && x < 0 && 0 < y && y <= R)
  12. if ((x - R)*(x - R) + (y + R)*(y + R) >= R * R)
  13. hit = 1;
  14. else if (0 < x && x <= R && -R <= y && y < 0)
  15. if ((x + R)*(x + R) + (y - R)*(y - R) >= R * R)
  16. hit = 1;
  17.  
  18. if (hit == 1)
  19. cout << "Eeee";
  20. else
  21. cout << "Bad";
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement