定积分求面积
2014-05-24 11:55
183 查看
http://acm.hdu.edu.cn/showproblem.php?pid=1071
![](http://acm.hdu.edu.cn/data/images/1071_1.bmp)
![](http://acm.hdu.edu.cn/data/images/1071_1.bmp)
#include<stdio.h> #include<string.h> int main() { //freopen("in.txt","r",stdin); int t; scanf("%d",&t); while(t--) { double x1,y1,x2,y2,x3,y3; double k,t,a,b,c; scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3); k=(y3-y2)/(x3-x2); t=y3-k*x3; a=(y2-y1)/((x2-x1)*(x2-x1)); b=-2*a*x1; c=y1+a*x1*x1; double s=a/3*(x3*x3*x3-x2*x2*x2)+(b-k)/2*(x3*x3-x2*x2)+(c-t)*(x3-x2); printf("%.2lf\n",s); } return 0; }
相关文章推荐
- hdu1071 (积分求面积)
- BZOJ 2178 圆的面积并 ——Simpson积分
- [省选前题目整理][SPOJ CIRU]The area of the union of circles(自适应Simpson积分求圆并面积)
- ZOJ 3866 Cylinder Candy(对体积和表面积 积分)
- 重积分和线面积分总结
- 1071 The area 求面积(积分)
- 导数和微分 之间的关系,积分中面积和路程模型
- bzoj 2178 圆的面积并【simpson积分】
- Bzoj2178:圆的面积并:Simpson积分
- hdu 1071 the area 用积分求面积
- [BZOJ]2178 圆的面积并 Simpson积分
- 积分解多条曲线围成面积且具有不同边界MATLAB
- 积分解多条曲线围成面积且具有不同边界MATLAB
- [SPOJ CIRU]The area of the union of circles(自适应Simpson积分求圆并面积)
- SDUT-3270 飞花的鱼塘(利用数学积分求面积)
- hdu1071(积分求面积)
- 数学积分求面积的 HDU1071The area
- BZOJ2178 圆的面积并 自适应Simpson积分
- bzoj2178 圆的面积并(自适应Simpson积分)
- 用积分求椭圆的面积