hdu 2438 暴力吧

#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;

bool distances(double x,double y,double l,double w)
{
   double angle = atan2(y,x);
   for(double i=0.0;i<=angle;i+=0.0001)
   {
	   double temp = fabs(x*sin(i)+y*cos(i)-l*sin(i)*cos(i));
	   if(temp<w)return false;
   }
   return true;
}
int main()
{
	double x,y,l,w;
	while(scanf("%lf%lf%lf%lf",&x,&y,&l,&w)!=EOF)
	{
		if(distances(x,y,l,w)&&distances(y,x,l,w))puts("yes");
		else puts("no");
	}
	return 0;
}


你可能感兴趣的:(include)