摘要: 可以通过顶角角度来计算切线与坐标轴的坐标开始还以为有公式可以算,谁知道原来是解二元一次方程,靠。。#include #include #include #include using namespace std;const int MAX=1050;struct point{ double x; in... 阅读全文
posted @ 2014-07-28 22:27 chenjunjie1994 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 不知 是怎么看出的精度不够,吸经验吧。#include #include #include #include #include using namespace std;char str[1000050];int dir[10][2]={{0,0},{-1,-1},{0,-1},{1,-1},{-1,... 阅读全文
posted @ 2014-07-28 20:50 chenjunjie1994 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 一条直线,必定可以通过旋转和平移使得它和一个上顶点一下顶点相切,这样的直线是最优的。因为这样能确定了直线所能到达的最远X。这样的两个顶点就规定了它的上下界,所以,枚举上下顶点,注意判断是否能到达入口处。只需判断直线是否与每个横切面的直线都有相交。#include #include #include ... 阅读全文
posted @ 2014-07-28 11:53 chenjunjie1994 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 由于到达点时不能绕墙,因为这是无意义的,所以,两点间的最小墙依然是按照直线所穿过的墙计算。#include #include #include #include using namespace std;const double eps=0.000000001;struct point{ double... 阅读全文
posted @ 2014-07-28 11:49 chenjunjie1994 阅读(160) 评论(0) 推荐(0) 编辑