http://acm.hdu.edu.cn/showproblem.php?pid=2547
好久没有刷这么水的题了,刷个超水题,倍感亲切。
两点之间,直线最短=w=。
#include <iostream>
#include <cmath>
using namespace std;
int main(){
#ifndef ONLINE_JUDGE
freopen("2547in.txt","r",stdin);
#endif
int t;
double a,b,c,d;
scanf("%d",&t);
while (t--){
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
printf("%.1lf\n",sqrt(a*a+b*b+c*c+d*d-2*a*c-2*b*d));
}
return 0;
}
11万+

被折叠的 条评论
为什么被折叠?



