Submission #76256916


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

int main() {
    int T;
    cin >> T;
    for(int i=0;i<T;i++){
        long long x1, y1, r1, x2, y2, r2;
        cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
        long long dx = x1 - x2;
        long long dy = y1 - y2;
        long long d2 = dx * dx + dy * dy;
        long long r = r1 + r2;
        long long  R = r1 - r2;
        if (r*r>=d2 && R*R <=d2){
            cout << "Yes" << endl;
        }
        else {
            cout << "No" << endl;
        }
    }
}

Submission Info

Submission Time
Task B - Two Rings
User naka0713
Language C++23 (GCC 15.2.0)
Score 250
Code Size 539 Byte
Status AC
Exec Time 2 ms
Memory 3612 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 2 ms 3404 KiB
01_random_00.txt AC 1 ms 3596 KiB
01_random_01.txt AC 1 ms 3408 KiB
01_random_02.txt AC 1 ms 3452 KiB
01_random_03.txt AC 1 ms 3408 KiB
01_random_04.txt AC 1 ms 3496 KiB
01_random_05.txt AC 1 ms 3488 KiB
01_random_06.txt AC 1 ms 3612 KiB
01_random_07.txt AC 1 ms 3464 KiB
01_random_08.txt AC 1 ms 3408 KiB
01_random_09.txt AC 1 ms 3604 KiB
01_random_10.txt AC 1 ms 3604 KiB
01_random_11.txt AC 1 ms 3464 KiB