题意:有一个二维(0,0)到(10,10)的区域,一个人从(0,0)开始一次拜访区域内的点,去找一样东西(就在这个区域内),每次他到达一个新的点后,都会有一句话,来告诉你是离那个东西更近了(Hotter),还是更远了(Colder),或者距离不变(Same),然后让你算出,这时那个东西可能处在的位置的区域的面积注意点:1. 这题主要搞清楚半平面要取到的区域,还有中垂线自己YY。小知识: 与直线ax+by+c=0垂直的直线方程为bx-ay+d = 0, 根据这个不用考虑斜率为0或不存在的问题,很方便。2. same以后的值都为0;其它 模板。模板1:View Code #include<s Read More
posted @ 2012-09-07 23:37
To be an ACMan
Views(444)
Comments(0)
Diggs(0)
另一种模板View Code #include<stdio.h>#include<string.h>#include<algorithm>#include<vector>#include<math.h>using namespace std;#define eps 1e-8#define inf 1<<29struct point { double x, y; bool mark; point(){} point(double xx, double yy) : x(xx), y(yy), mark(1) {}};vecto Read More
posted @ 2012-09-07 14:17
To be an ACMan
Views(238)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号