Guest User

Untitled

a guest
Jan 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include <cstdio>
  2. #include <math.h>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. double ile, x, x1, y, y1, r, r1, R, X;
  10.  
  11. scanf("%lf", &ile);
  12.  
  13. for(int i=0; i<ile; i++)
  14. {
  15. scanf("%lf", &x);
  16. scanf("%lf", &y);
  17. scanf("%lf", &r);
  18. scanf("%lf", &x1);
  19. scanf("%lf", &y1);
  20. scanf("%lf", &r1);
  21.  
  22. X = pow(x-x1, 2) + pow(y-y1, 2);
  23. R= pow(r, 2) + pow(r1, 2);
  24.  
  25. if(X>R)
  26. {
  27. printf("NIE\n");
  28. }
  29. else
  30. {
  31. printf("TAK\n");
  32. }
  33. }
  34. return 0;
  35. }
Add Comment
Please, Sign In to add comment