标签:des style blog http color java os io
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 7611 Accepted Submission(s): 5332
1 #include <iostream> 2 #include <string> 3 #include <map> 4 #include <stdio.h> 5 #include <math.h> 6 using namespace std; 7 #define pi acos(-1) 8 9 double a, b, c; 10 double S(double x){ 11 return a*x*x*x/3+b*x*x/2+c*x; 12 } 13 14 main() 15 { 16 int t; 17 double x1, y1, x2, y2, x3, y3; 18 double s; 19 cin>>t; 20 while(t--){ 21 scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3); 22 a=(y2-y1)/(x2*x2-2*x1*x2+x1*x1); 23 b=-2*a*x1; 24 c=y3-a*x3*x3-b*x3; 25 s=S(x3)-S(x2)-(y2+y3)*(x3-x2)/2; 26 printf("%.2lf\n",s); 27 } 28 }
标签:des style blog http color java os io
原文地址:http://www.cnblogs.com/qq1012662902/p/3919828.html