【题目分析】

求二次函数和一次函数围成的面积。

先解方程求出一次函数和二次函数。

然后积分。

现在还是不会积分。

【代码】

#include <cstdio>
#include <cstring>
#include <cstdlib>
//#include <cmath> #include <set>
#include <map>
#include <string>
#include <algorithm>
#include <vector>
#include <iostream>
#include <queue> using namespace std; #define maxn 20005
#define mlog 16
#define inf (0x3f3f3f3f) void Finout()
{
#ifndef ONLINE_JUDGE
freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
#endif
} int Getint()
{
int x=0,f=1; char ch=getchar();
while (ch<'0'||ch>'9') {if (ch=='-') f=-1; ch=getchar();}
while (ch>='0'&&ch<='9') {x=x*10+ch-'0'; ch=getchar();}
return x*f;
} int T;
double x1,x2,x3,y1,y2,y3;
double a,b,c,t,k; int main()
{
Finout();
T=Getint();
while (T--)
{
scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3);
k=(y3-y2)/(x3-x2);
t=y3-x3*k;
a=(y2-y1)/((x1-x2)*(x1-x2));
b=-x1*2*a;
c=y1-a*x1*x1-b*x1;
printf("%.2f\n",(a/3*x3*x3*x3+(b-k)/2*x3*x3+x3*(c-t))-(a/3*x2*x2*x2+(b-k)/2*x2*x2+x2*(c-t)));
}
}

  

最新文章

  1. iOS类中的属性设置背景色(统一)
  2. Javascript - Arraylike的7种实现
  3. DOM操作基础
  4. JSP lifecycle - with servlet
  5. jquery 实现页面拖拽并保存到cookie
  6. (大数据工程师学习路径)第一步 Linux 基础入门----用户及文件权限管理
  7. 为ASP.NET MVC应用程序使用高级功能
  8. html .css 实现图片滑动和自动播放特效移动端 HTML 5中添加了以touch 开头的事件
  9. HDU1394(线段树||树状数组)
  10. 基于Mac制作iPhone铃声教程,iTunes定制铃声
  11. Nginx详细安装部署教程
  12. PHP常用的函数与小技巧
  13. Install OpenCV on Ubuntu or Debian
  14. JS 存储
  15. 修改host文件——mac
  16. Subversion detected an unsupported working copy version
  17. /etc/profile不生效问题
  18. Zabbix应用一:Zabbix安装
  19. 1-求组合数(c(n, m))的几种方法
  20. 在IDEA中 SFTP 进行发布操作

热门文章

  1. Exoplanet: The hunt is on
  2. codevs 1115 开心的金明
  3. UVA 247 - Calling Circles (Floyd)
  4. KissXML类库的使用方法
  5. python中的循环语句-01
  6. CAD交互绘制批注(网页版)
  7. nodejs:遍历文件夹文件统计文件大小
  8. 多进程Queue
  9. IIS应用程序池&quot;启用32位&quot;导致服务不可用的503错误
  10. 关于js作用域问题详解