Submission #76259766


Source Code Expand

#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=2e5+10;
int main(){
	int T;scanf("%d",&T);
	while(T--){
		ll x,y,r,xx,yy,rr;
		scanf("%lld%lld%lld%lld%lld%lld",&x,&y,&r,&xx,&yy,&rr);
		ll s=(xx-x)*(xx-x)+(yy-y)*(yy-y);
		ll l=r-rr,R=r+rr;
		if(l*l<=s&&s<=R*R)puts("Yes");
		else puts("No");
	}
	
	return 0;
}

Submission Info

Submission Time
Task B - Two Rings
User VastYang
Language C++23 (GCC 15.2.0)
Score 250
Code Size 354 Byte
Status AC
Exec Time 1 ms
Memory 3756 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 1
AC × 13
Set Name Test Cases
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
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3732 KiB
01_random_00.txt AC 1 ms 3720 KiB
01_random_01.txt AC 1 ms 3576 KiB
01_random_02.txt AC 1 ms 3736 KiB
01_random_03.txt AC 1 ms 3592 KiB
01_random_04.txt AC 1 ms 3668 KiB
01_random_05.txt AC 1 ms 3568 KiB
01_random_06.txt AC 1 ms 3652 KiB
01_random_07.txt AC 1 ms 3540 KiB
01_random_08.txt AC 1 ms 3720 KiB
01_random_09.txt AC 1 ms 3732 KiB
01_random_10.txt AC 1 ms 3592 KiB
01_random_11.txt AC 1 ms 3756 KiB