提出 #76240932


ソースコード 拡げる

#include <bits/stdc++.h>
#define int long long
#define ll long long
#define ull unsigned long long
#define inf 1e18
#define eps 1e-9
#define endl "\n"
#define il inline
#define ls 2*k
#define rs 2*k+1
using namespace std;
const int N=2e5+5,M=2e6+5;
const int mod=998244353;
inline int read(){
    int x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){
        if(ch=='-') f=-1;
        ch=getchar();
    }
    while(ch>='0' && ch<='9') x=x*10+ch-'0',ch=getchar();
    return x*f;
}
long double a,b,c,d,r1,r2;
signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	int tc;cin>>tc; 
	while(tc--){
		cin>>a>>b>>r1>>c>>d>>r2;
		long double dis=sqrt((a-c)*(a-c)+(b-d)*(b-d));
//		cout<<(a-c)*(a-c)<<' '<<(b-d)*(b-d)<<' '<<(a-c)*(a-c)+(b-d)*(b-d)<<'\n'; 
		if(dis>r1 && dis>r2){
			if((r1+r2)>=dis) cout<<"Yes\n";
			else cout<<"No\n";
		}
		else{
			if(r1<r2) swap(r1,r2);
			if((dis+r2)>=r1) cout<<"Yes\n";
			else cout<<"No\n";
		}
//		cout<<dis<<' '<<r1<<'\n'; 
	}
	return 0;
}
/*

*/

提出情報

提出日時
問題 B - Two Rings
ユーザ Limingxuan
言語 C++23 (GCC 15.2.0)
得点 250
コード長 1050 Byte
結果 AC
実行時間 1 ms
メモリ 3984 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 250 / 250
結果
AC × 1
AC × 13
セット名 テストケース
Sample 00_sample_00.txt
All 00_sample_00.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3740 KiB
01_random_00.txt AC 1 ms 3716 KiB
01_random_01.txt AC 1 ms 3608 KiB
01_random_02.txt AC 1 ms 3692 KiB
01_random_03.txt AC 1 ms 3692 KiB
01_random_04.txt AC 1 ms 3708 KiB
01_random_05.txt AC 1 ms 3608 KiB
01_random_06.txt AC 1 ms 3984 KiB
01_random_07.txt AC 1 ms 3840 KiB
01_random_08.txt AC 1 ms 3776 KiB
01_random_09.txt AC 1 ms 3716 KiB
01_random_10.txt AC 1 ms 3608 KiB
01_random_11.txt AC 1 ms 3680 KiB