摘要: 乱搞题,就是看仔细不仔细了。代码很水,分好几种情况。c所在的位置分三种情况,分别计算;ab那条线段也可能是平行x轴或y轴,也分别计算。My Code:#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>#define pi 3.1415926535using namespace std;struct point{ double x; double y;};int Abs(double x){ return x 阅读全文
posted @ 2011-10-28 22:09 AC_Von 阅读(199) 评论(0) 推荐(0) 编辑
摘要: /*思路完全搞乱,开始就没想清楚就写。我晕,各种WA。思路: 找到所有点中最下边一层点里边最靠左的点d。然后求d到其他每个点连线与x轴的夹角Θ(0 <=Θ <=π 因为d的纵坐标最小)。然后从小到大排序,找到存角度的数组里n/2号点就是要找的另一个点。*/My Code:#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>#define pi 3.1415926535using namespace 阅读全文
posted @ 2011-10-28 20:16 AC_Von 阅读(347) 评论(1) 推荐(0) 编辑