Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x1,y1,r1,x2,y2,r2;
- cin>>x1>>y1>>r1>>x2>>y2>>r2;
- int distance=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
- if(distance<=(r1+r2)*(r1+r2))cout<<"YES"<<endl;
- else cout<<"NO"<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement