提交时间:2022-10-17 13:56:07
运行 ID: 60862
#include <bits/stdc++.h> using namespace std; long long x1,x2,x3,yy,y2,y3,r,t; long double ans1,ans2; int main() { cin>>t; for(; t>0; t--) { cin>>x1>>yy>>x2>>y2>>x3>>y3>>t; long long a1=x2-x1,b1=y2-yy,c=-(a1*x1+b1*yy); long double ans1=abs(a1*x3+b1*y3+c)/sqrt((long double)a1*a1+b1*b1)-r,ans2=sqrt((long double)(x3-x1)*(x3-x1)+(y3-yy)*(y3-yy)); } printf("%.2Lf %.2Lf\n",ans1,ans2); return 0; }