摘要: 代碼如下#include <set>#include <map>#include <cmath>#include <queue>#include <stack>#include <string>#include <vector>#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>using namespace std;typedef long long ll;typed 阅读全文
posted @ 2013-04-14 21:34 yejinru 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目: 给出n个凸包,现在要用炸弹炸毁固定的坐标,被攻击的坐标所在的凸包会被毁灭, 现在问你被毁灭的凸包的面积分析: 求凸包+求多边形面积#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>using namespace std;const int X = 105;#define debug puts("here");int top,n,a[X];bool use[X];struct no 阅读全文
posted @ 2013-04-14 20:04 yejinru 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 通過這一體說說三分的做法。题目列表 > 集会时间限制: 2000ms 内存限制: 256MB描述在一条河的一侧,分布着 N 个村庄。这些村庄平日里需要一些贸易往来,然而商人们来回走遍每一座村庄是非常辛苦的,于是他们决定每个月都在河边举行一次集会,大家都来集会上购买需要的物品。然而在集会地点的选择上,大家却有分歧,因为谁都不愿意集会的地点离自己村庄非常远。经过一番激烈的讨论之后,大家决定要将集会地点挑选在这样一个位置:它离最远的村庄的距离要尽可能的近。我们把河看做一条足够长的直线,河岸就是平面坐标系上 y = 0 的这条线,y f(x2),如左圖,則把l = x1 否則,r = x23.重 阅读全文
posted @ 2013-04-14 17:05 yejinru 阅读(370) 评论(6) 推荐(1) 编辑