Submission #697099


Source Code Expand

#include <iostream>
#include <math.h>
using namespace std;

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,j) for(int i=0;i<j;i++)

int main(void){

	double x1, y1, r;
	double x2, y2, x3, y3;

	cin >> x1 >> y1 >> r;
	cin >> x2 >> y2 >> x3 >> y3;

	if((x1 + r > x3 - x2 || x1 - r < x2) 
		&& (y1 + r > y3 - y2 || y1 - r < y2))
		cout << "YES" << "\n";
	else
		cout << "NO" << "\n";


	if(sqrt(pow(x3-x1,2.0) + pow(y3-x1,2.0)) < r &&
		sqrt(pow(x2-x1,2.0) + pow(y2-x1,2.0)) < r)
		cout << "NO" << "\n";
	else
		cout << "YES" << "\n";
}

Submission Info

Submission Time
Task A - 塗り絵
User yori1029
Language C++14 (GCC 5.4.1)
Score 0
Code Size 569 Byte
Status WA
Exec Time 4 ms
Memory 256 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
AC × 5
AC × 24
WA × 11
Set Name Test Cases
Sample example_0.txt, example_1.txt, example_2.txt, example_3.txt, example_4.txt
All blue_0.txt, blue_1.txt, blue_2.txt, blue_3.txt, blue_4.txt, blue_5.txt, blue_6.txt, blue_7.txt, blue_8.txt, blue_9.txt, example_0.txt, example_1.txt, example_2.txt, example_3.txt, example_4.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, random_5.txt, random_6.txt, random_7.txt, random_8.txt, random_9.txt, red_0.txt, red_1.txt, red_2.txt, red_3.txt, red_4.txt, red_5.txt, red_6.txt, red_7.txt, red_8.txt, red_9.txt
Case Name Status Exec Time Memory
blue_0.txt AC 4 ms 256 KiB
blue_1.txt AC 4 ms 256 KiB
blue_2.txt AC 4 ms 256 KiB
blue_3.txt AC 4 ms 256 KiB
blue_4.txt WA 4 ms 256 KiB
blue_5.txt AC 4 ms 256 KiB
blue_6.txt AC 4 ms 256 KiB
blue_7.txt AC 4 ms 256 KiB
blue_8.txt WA 4 ms 256 KiB
blue_9.txt AC 4 ms 256 KiB
example_0.txt AC 4 ms 256 KiB
example_1.txt AC 4 ms 256 KiB
example_2.txt AC 4 ms 256 KiB
example_3.txt AC 4 ms 256 KiB
example_4.txt AC 4 ms 256 KiB
random_0.txt WA 4 ms 256 KiB
random_1.txt WA 4 ms 256 KiB
random_2.txt AC 4 ms 256 KiB
random_3.txt AC 4 ms 256 KiB
random_4.txt AC 4 ms 256 KiB
random_5.txt AC 4 ms 256 KiB
random_6.txt AC 4 ms 256 KiB
random_7.txt AC 4 ms 256 KiB
random_8.txt AC 4 ms 256 KiB
random_9.txt AC 4 ms 256 KiB
red_0.txt WA 4 ms 256 KiB
red_1.txt AC 4 ms 256 KiB
red_2.txt AC 4 ms 256 KiB
red_3.txt WA 4 ms 256 KiB
red_4.txt WA 4 ms 256 KiB
red_5.txt WA 4 ms 256 KiB
red_6.txt WA 4 ms 256 KiB
red_7.txt WA 4 ms 256 KiB
red_8.txt AC 4 ms 256 KiB
red_9.txt WA 4 ms 256 KiB