Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
60440 007yingziyu S1 C++ 解答错误 70 724 MS 256 KB 367 2022-10-15 11:37:54

Tests(7/10):


#include<bits/stdc++.h> using namespace std; float t,a,b,c,d,e,f,r,k1,b1,sum; int main(){ cin>>t; while(t--){ cin>>a>>b>>c>>d>>e>>f>>r; if(a==c)sum=abs(a-e); else{ k1=(d-b)/(c-a),b1=(b*c-a*d)/(c-a); sum=abs(k1*e-f+b1)/sqrt(k1*k1+1)-r; } printf("%.2f %.2f\n",sum,max(sqrt((e-a)*(e-a)+(f-b)*(f-b)),sqrt((e-c)*(e-c)+(f-d)*(f-d)))+r); } }


测评信息: