随笔分类 - 计算几何
摘要:这两道题都是规范相交的模板题。HDU 1086题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1086View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 struct node 4 { 5 double x,y; 6 }start[124],end[124]; 7 double eps=0.0000000001; 8 double judge(node p1,node p2,node p )//判断点是否在直线的两边 9 {10 return (p1.x-p.x)*(p2.
阅读全文
摘要:叉乘求面积 模板题题目链接http://acm.hdu.edu.cn/showproblem.php?pid=2036View Code 1 #include<stdio.h> 2 #include<string.h> 3 int square(int a1,int b1,int a2,int b2) 4 { 5 return(a1*b2-a2*b1); 6 } 7 int main() 8 { 9 int n,i;10 double fan,x[100],y[100];11 while(~scanf("%d",&n)&&n!
阅读全文

浙公网安备 33010602011771号