sicily 1179. Extrusion
摘要:
#include<iostream> //计算多边形面积(利用向量叉乘)#include<stdio.h>#include<cmath>using namespace std;struct Point { double x, y;}p[10000];double polygon_area(int n){ double area=0; for(int i=0;i<n-1;++i) { area+=p[i].x*p[i+1].y-p[i].y*p[i+1].x; } area+=p[n-1].x*p[0].y-p[n-1].y*p[0].x; return 阅读全文
posted @ 2011-07-10 22:46 sysu_mjc 阅读(198) 评论(0) 推荐(0) 编辑