提出 #712211


ソースコード 拡げる

// ConsoleApplication1.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//


#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iomanip>
#include <iterator>
#include <sstream>

#define FOR(i,a,b) for (long long i=(a);i<(b);i++)
#define RFOR(i,a,b) for (long long i=(b)-1;i>=(a);i--)
#define REP(i,n) for (unsigned long long i=0;i<(n);i++)
#define RREP(i,n) for (long long i=(n)-1;i>=0;i--)

#define inf INT_MAX/3
#define INF INT_MAX/3
#define llinf LLONG_MAX/3
#define LLINF LLONG_MAX/3
#define PB push_back
#define pb push_back
#define MP make_pair
#define mp make_pair
#define ALL(a) (a).begin(),(a).end()
#define all(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
#define CLR(a) memset(a,0,sizeof a)
#define PII pair<int,int>
#define pii pair<int,int>
#define pcc pair<char,char>
#define pic pair<int,char>
#define pci pair<char,int>
#define VS vector<string>
#define VI vector<int>
#define debug(x) cout<<#x<<": "<<x<<endl
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)
#define pi 2*acos(0.0)
#define INFILE() freopen("in0.txt","r",stdin)
#define OUTFILE()freopen("out0.txt","w",stdout)
#define in scanf
#define out printf
#define LL long long
#define ll long long
#define ULL unsigned long long
#define ull unsigned long long
#define eps 1e-14
#define FST first
#define SCD second

using namespace std;

signed main()
{
	double x1, y1, r;
	double x2, y2, x3, y3;

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

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

	if ((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) <= r * r &&
		(x3 - x1) * (x3 - x1) + (y2 - y1) * (y2 - y1) <= r * r &&
		(x2 - x1) * (x2 - x1) + (y3 - y1) * (y3 - y1) <= r * r &&
		(x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1) <= r * r) {
		cout << "NO\n";
	}
	else {
		cout << "YES\n";
	}

	return 0;
}

提出情報

提出日時
問題 A - 塗り絵
ユーザ tremolo_99_
言語 C++14 (Clang 3.8.0)
得点 100
コード長 2270 Byte
結果 AC
実行時間 6 ms
メモリ 256 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 5
AC × 35
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
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 AC 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 AC 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 6 ms 256 KiB
example_4.txt AC 4 ms 256 KiB
random_0.txt AC 4 ms 256 KiB
random_1.txt AC 4 ms 256 KiB
random_2.txt AC 4 ms 256 KiB
random_3.txt AC 5 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 AC 4 ms 256 KiB
red_1.txt AC 4 ms 256 KiB
red_2.txt AC 4 ms 256 KiB
red_3.txt AC 4 ms 256 KiB
red_4.txt AC 5 ms 256 KiB
red_5.txt AC 4 ms 256 KiB
red_6.txt AC 4 ms 256 KiB
red_7.txt AC 4 ms 256 KiB
red_8.txt AC 6 ms 256 KiB
red_9.txt AC 4 ms 256 KiB