Submission #76245601


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
 
int main() {
   int t;
   cin >> t;
   long long x1[105],x2[105];
   long long y1[105],y2[105];
   long long R1[105],R2[105];
   for(int i = 0; i < t; i ++) cin >> x1[i] >> y1[i] >> R1[i] >> x2[i] >> y2[i] >> R2[i];

   for(int i = 0; i < t; i ++){
    long long diff = R1[i] - R2[i];
    long long sum = R1[i] + R2[i];
    long long d = (x1[i] - x2[i]) * (x1[i] - x2[i]) + (y1[i] - y2[i]) * (y1[i] - y2[i]);
    if(diff * diff <=  d && sum * sum >= d) cout << "Yes" << endl;
    else cout << "No" << endl;
   }
}

Submission Info

Submission Time
Task B - Two Rings
User Kisaragi2000
Language C++23 (GCC 15.2.0)
Score 250
Code Size 579 Byte
Status AC
Exec Time 1 ms
Memory 3632 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 3488 KiB
01_random_00.txt AC 1 ms 3576 KiB
01_random_01.txt AC 1 ms 3508 KiB
01_random_02.txt AC 1 ms 3560 KiB
01_random_03.txt AC 1 ms 3564 KiB
01_random_04.txt AC 1 ms 3436 KiB
01_random_05.txt AC 1 ms 3376 KiB
01_random_06.txt AC 1 ms 3612 KiB
01_random_07.txt AC 1 ms 3488 KiB
01_random_08.txt AC 1 ms 3632 KiB
01_random_09.txt AC 1 ms 3512 KiB
01_random_10.txt AC 1 ms 3564 KiB
01_random_11.txt AC 1 ms 3632 KiB