Advertisement
elephantsarecool

две окружности

Dec 21st, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int x1,y1,r1,x2,y2,r2;
  6.     cin>>x1>>y1>>r1>>x2>>y2>>r2;
  7.     int distance=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
  8.     if(distance<=(r1+r2)*(r1+r2))cout<<"YES"<<endl;
  9.     else cout<<"NO"<<endl;
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement