Submission #76232530
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#include "atcoder/all"
using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (n); ++i)
//using mint=modint998244353;
void solve(){
long long x1,y1,r1,x2,y2,r2;
cin>>x1>>y1>>r1>>x2>>y2>>r2;
long long reng=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
if(abs(r1-r2)*abs(r1-r2)<=reng and reng<=(r1+r2)*(r1+r2))cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t=1;
cin>>t;
while(t--)solve();
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Two Rings |
| User | itoito1234 |
| Language | C++23 (GCC 15.2.0) |
| Score | 250 |
| Code Size | 545 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3676 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 | 3588 KiB |
| 01_random_00.txt | AC | 1 ms | 3676 KiB |
| 01_random_01.txt | AC | 1 ms | 3576 KiB |
| 01_random_02.txt | AC | 1 ms | 3376 KiB |
| 01_random_03.txt | AC | 1 ms | 3428 KiB |
| 01_random_04.txt | AC | 1 ms | 3620 KiB |
| 01_random_05.txt | AC | 1 ms | 3528 KiB |
| 01_random_06.txt | AC | 1 ms | 3676 KiB |
| 01_random_07.txt | AC | 1 ms | 3556 KiB |
| 01_random_08.txt | AC | 1 ms | 3620 KiB |
| 01_random_09.txt | AC | 1 ms | 3528 KiB |
| 01_random_10.txt | AC | 1 ms | 3528 KiB |
| 01_random_11.txt | AC | 1 ms | 3676 KiB |