题目链接
https://ac.nowcoder.com/acm/contest/8564/H
解题思路
签到题。
尽管如此,我还是wa了,直到看了题解。
高中知识:
两圆相交的充分必要条件:
我还der呼呼的用了esp,直接爆零,爽翻!
#include<iostream>
#define ll long long
using namespace std;
double x1,x2,y1,y2,r1,r2;
int T;
int main()
{
cin>>T;
while(T--)
{
cin>>x1>>y1>>r1>>x2>>y2>>r2;
double dispow=((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
if(((r1+r2)*(r1+r2)>=dispow && dispow>=(r1-r2)*(r1-r2)) ) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
}

京公网安备 11010502036488号