杭电2547

来源:互联网 发布:决策支持软件 编辑:程序博客网 时间:2024/06/02 00:37

两点中点就是最合适的点

#include <iostream>#include <cstdio>#include <cmath>using namespace std;int main(){    int t;    double a,b,c,d,x,y,outCome;    scanf("%d",&t);    while(t--)    {        scanf("%lf %lf %lf %lf",&a,&b,&c,&d);        outCome=sqrt((c-a)*(c-a)+(d-b)*(d-b));        printf("%.1lf\n",outCome);    }return 0;}


原创粉丝点击