Submission #76233529
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=1000+5;
bool st;
int t,x,y,xx,yy,r1,r2;
bool ed;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
cerr<<(double)(&st-&ed)/1024/1024<<'\n';
cin>>t;
while(t--) {
cin>>x>>y>>r1>>xx>>yy>>r2;
__int128 d=(x-xx)*(x-xx);
d+=(y-yy)*(y-yy);
__int128 a=(r1+r2);a=a*a;
__int128 b=(r1-r2);b=b*b;
if(d>a||d<b) cout<<"No\n";
else cout<<"Yes\n";
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Two Rings |
| User | wallacewan |
| Language | C++23 (GCC 15.2.0) |
| Score | 250 |
| Code Size | 494 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3860 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 250 / 250 | ||||
| Status |
|
|
| 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 | 3736 KiB |
| 01_random_00.txt | AC | 1 ms | 3860 KiB |
| 01_random_01.txt | AC | 1 ms | 3812 KiB |
| 01_random_02.txt | AC | 1 ms | 3772 KiB |
| 01_random_03.txt | AC | 1 ms | 3636 KiB |
| 01_random_04.txt | AC | 1 ms | 3716 KiB |
| 01_random_05.txt | AC | 1 ms | 3728 KiB |
| 01_random_06.txt | AC | 1 ms | 3772 KiB |
| 01_random_07.txt | AC | 1 ms | 3728 KiB |
| 01_random_08.txt | AC | 1 ms | 3728 KiB |
| 01_random_09.txt | AC | 1 ms | 3760 KiB |
| 01_random_10.txt | AC | 1 ms | 3792 KiB |
| 01_random_11.txt | AC | 1 ms | 3688 KiB |