ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ #include <iostream> #include <stdio.h> using namespace std; int main() { int t; double x1,y1,x2,y2,x3,y3,a,k,s; cin>>t; while(t--) { cin>>x1>>y1>>x2>>y2>>x3>>y3; a=(y2-y1)/((x2-x1)*(x2-x1)); k=(y2-y3)/(x2-x3); s=a/3*(x3*x3*x3-x2*x2*x2)+(a*x1*x1+k*x3+y1-y3)*(x3-x2)+0.5*(2*a*x1+k)*(x2*x2-x3*x3); printf("%.2f\n",s); } return 0; } ~~~