Im_hear

导航

2012年5月13日

zoj 1010

摘要: 求多边形面积的题,先要判读多边形是否合法,摘了别人两个代码。关于注释,现在的看法是必须的,没有注释的代码如同没印编号的rmb。source code 阅读全文

posted @ 2012-05-13 16:07 Im_hear 阅读(112) 评论(0) 推荐(0) 编辑

zoj 1010

摘要: View Code 1 #include <iostream> 2 #include <cmath> 3 using namespace std; 4 5 // 精度容差 6 const double EPS = 1e-5; 7 8 // 允许容差的浮点数相等 9 inline bool equals( double x, double y ) { 10 return fabs( x - y ) < EPS; 11 } 12 13 // 点结构 14 struct Point { 15 Point() {} 16 Point( dou... 阅读全文

posted @ 2012-05-13 16:02 Im_hear 阅读(235) 评论(0) 推荐(0) 编辑