摘要: 基本算法C++的标准模版库的应用poj3096,poj3007较为复杂的模拟题的训练poj3393,poj1472,poj1027,poj3371,poj2706POJ 3096水题,map,set随便搞POJ 1472TLE了一下午,PE了一晚上。。。我滴神啊!算时间复杂度,用堆模拟。。。参考的代码。。。T_TView Code #include <iostream>#include <cstring>#include <cstdio>#include <cstdlib>#include <string>using namespac 阅读全文
posted @ 2012-04-11 15:52 AC_Von 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 点结构struct Point { double x; double y; Point(double a = 0, double b = 0) : x(a), y(b) {}};1、浮点数过滤int dbcmp(double x) { if(x > eps) return 1; else if(x < -eps) return -1; return 0;}2、线段求交点(简化一下可以用来判线段相交(规范相交))double det(double x1, double y1, double x2, double y2) { //求叉积 ... 阅读全文
posted @ 2012-04-11 15:47 AC_Von 阅读(281) 评论(0) 推荐(0) 编辑