Submission #696514
Source Code Expand
#include<bits/stdc++.h>
#define REP(x,y,z) for(int x=y;x<=z;x++)
#define FORD(x,y,z) for(int x=y;x>=z;x--)
#define MSET(x,y) memset(x,y,sizeof(x))
#define FOR(x,y) for(__typeof(y.begin()) x=y.begin();x!=y.end();x++)
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define SZ size()
#define M
#define y1 MY_y1
void RI(){}
template<typename... T>
void RI( int& head, T&... tail ) {
scanf("%d",&head);
RI(tail...);
}
using namespace std;
typedef long long LL;
int x1,y1,x2,y2,x3,y3,r;
bool c_in_r()
{
if(x2<=x1-r && x1-r<=x3)
if(x2<=x1+r && x1+r<=x3)
if(y2<=y1-r && y1-r<=y3)
if(y2<=y1+r && y1+r<=y3)
return true;
return false;
}
bool chk(int x,int y)
{
return x*x + y*y <= r*r;
}
bool r_in_c()
{
if( chk(x2-x1, y2-y1) )
if( chk(x2-x1, y3-y1) )
if( chk(x3-x1, y2-y1) )
if( chk(x3-x1, y3-y1) )
return true;
return false;
}
int main()
{
while(~scanf("%d %d %d",&x1,&y1,&r))
{
RI(x2,y2,x3,y3);
if(c_in_r())
{
puts("NO\nYES");
}
else if(r_in_c())
{
puts("YES\nNO");
}
else
{
puts("YES\nYES");
}
}
return 0;
}
Submission Info
Submission Time
2016-04-16 21:37:56+0900
Task
A - 塗り絵
User
Nekosyndrome
Language
C++14 (GCC 5.4.1)
Score
100
Code Size
1162 Byte
Status
AC
Exec Time
5 ms
Memory
256 KiB
Compile Error
./Main.cpp: In function ‘void RI(int&, T& ...) [with T = {int, int, int}]’:
./Main.cpp:16:5: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&head);
^
./Main.cpp: In function ‘void RI(int&, T& ...) [with T = {int, int}]’:
./Main.cpp:16:5: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
./Main.cpp: In function ‘void RI(int&, T& ...) [with T = {int}]’:
./Main.cpp:16:5: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
./Main.cpp: In function ‘void RI(int&, T& ...) [with T = {}]’:
./Main.cpp:16:5: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
100 / 100
Status
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
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
4 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
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
AC
5 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
4 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
4 ms
256 KiB
red_9.txt
AC
4 ms
256 KiB