1071—The area
来源:互联网 发布:淘宝用什么修图软件 编辑:程序博客网 时间:2024/05/19 14:00
题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=1071
经验教训:纯数学题~~~
我的代码(抛物线作于原点会更好做点~~)
#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){int t;double x1,x2,x3,y1,y2,y3;scanf("%d",&t);int i;for(i=0;i<t;i++){scanf("%lf%lf",&x1,&y1);scanf("%lf%lf",&x2,&y2);scanf("%lf%lf",&x3,&y3);double k=0;double a,b,c,s1,s2,s;//a=(y2-y3)/(x2*x2-x3*x3-2*x1*x2+2*x1*x3);a=(y2-y1)/((x2-x1)*(x2-x1));b=-2.0*a*x1;c=y1-a*x1*x1-b*x1;k=(y3-y2)/(x3-x2);s1=1.0/3*a*x3*x3*x3+1.0/2*b*x3*x3+c*x3-1.0/2*k*x3*x3+(k*x2-y2)*x3;s2=1.0/3*a*x2*x2*x2+1.0/2*b*x2*x2+c*x2-1.0/2*k*x2*x2+(k*x2-y2)*x2;s=s1-s2;printf("%.2lf\n",s);}return 0;}
- 1071—The area
- 杭电1071——The area!
- 数学—杭电1071 The area
- 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
- HDU 1071 The area
- hdu 1071 - The area
- hdu-1071 The area
- 1071The area
- hdu 1071 The area
- 找出数组中只出现一次的2个数
- 怎样调用基类的私有虚函数(private virtual function)
- Zend_Db_Table详解
- ALSA驱动概述
- XCode 4.2下Wax的安装步骤
- 1071—The area
- 榆木脑壳练算法之迷宫寻路问题
- Matlab忆阻器模型Memristor model
- 水果的正确吃法
- C++中虚函数的作用是什么?它应该怎么用呢?
- 捣腾Opengl(windows xp +mingw32+freeglut)
- 免费申请邓白氏编码
- Mac下修改文件属性的命令
- java 项目制作 bat 可执行文件