Peng Lv

毋意,毋必,毋固,毋我。 言必行,行必果。

导航

2012年5月16日 #

{HDU}{4082}{Hou Yi's secret}{几何}

摘要: 11年北京赛区的B题,数据量很小暴力搜索的计算几何,但是有很多小地方需要注意,WA了N次:注意对点判重,否则乎会生成很多一样的三角形三个点在同一条直线上的情况判断相似性的时候不需要判断角度,只需要对边进行比例判定即可#include <iostream>#include <string>#include <cstring>#include <cstdio>#include <algorithm>#include <memory>#include <cmath>#include <bitset>#in 阅读全文

posted @ 2012-05-16 21:06 Lvpengms 阅读(395) 评论(0) 推荐(0) 编辑

{HDU}{4190}{Distributing Ballot Boxes}{二分答案}

摘要: 二分答案与箱子数目进行匹配判定。#include <iostream>#include <string>#include <cstring>#include <cstdio>#include <algorithm>#include <memory>#include <cmath>#include <bitset>#include <queue>#include <vector>#include <stack>using namespace std;const in 阅读全文

posted @ 2012-05-16 17:05 Lvpengms 阅读(293) 评论(0) 推荐(0) 编辑

{HDU}{4193}{Non-negative Partial Sums}

摘要: 对数组进行预处理,由于是连续的可以在O(1)的时间进行判定查询,WA了N次。#include <iostream>#include <string>#include <cstring>#include <cstdio>#include <algorithm>#include <memory>#include <cmath>#include <bitset>#include <queue>#include <vector>#include <stack>using 阅读全文

posted @ 2012-05-16 16:42 Lvpengms 阅读(544) 评论(0) 推荐(0) 编辑