HDU 1071 The area
2012-04-16 23:39
295 查看
http://acm.hdu.edu.cn/showproblem.php?pid=1071
按要求求出面积即可
View Code
按要求求出面积即可
View Code
#include <stdio.h> int main() { int t; double x0,y0,x1,y1,x2,y2; double k,b; double a; double s; scanf("%d",&t); while(t--) { scanf("%lf%lf%lf%lf%lf%lf",&x0,&y0,&x1,&y1,&x2,&y2); k=(y2-y1)/(x2-x1); b=y1-k*x1; a=(y1-y0)/(x1-x0)/(x1-x0); s=(a*x2*x2*x2/3-a*x0*x2*x2+(a*x0*x0+y0)*x2-a*x1*x1*x1/3+a*x0*x1*x1-(a*x0*x0+y0)*x1-k*x2*x2/2-b*x2+k*x1*x1/2+b*x1); printf("%.2lf\n",s); } return 0; }
相关文章推荐
- HDU 1071:The area
- hdu 1071 The area
- HDU 1071 - The area
- hdu 1071 The area
- HDU 1071 The area
- hdu 1071 The area
- HDU 1071 - The area
- hdu 1071 The area
- HDU 1071 The area
- The area (HDU 1071)
- hdu 1071 The area
- hdu 1071 The area
- HDU-1071 The area
- HDU 1071 The area
- hdu 1071 The area
- HDU 1071 The area
- hdu 1071 The Area
- hdu 1071 the area 用积分求面积
- HDU 1071 The area
- hdu-1071-The area