Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <math.h>
- #include <algorithm>
- using namespace std;
- int main()
- {
- double ile, x, x1, y, y1, r, r1, R, X;
- scanf("%lf", &ile);
- for(int i=0; i<ile; i++)
- {
- scanf("%lf", &x);
- scanf("%lf", &y);
- scanf("%lf", &r);
- scanf("%lf", &x1);
- scanf("%lf", &y1);
- scanf("%lf", &r1);
- X = pow(x-x1, 2) + pow(y-y1, 2);
- R= pow(r, 2) + pow(r1, 2);
- if(X>R)
- {
- printf("NIE\n");
- }
- else
- {
- printf("TAK\n");
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment