题解 | 绕距
绕距
https://www.nowcoder.com/practice/7a245fc6284f4139b4fb21de58e68483
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
int c, d;
cin >> a >> b;
cin >> c >> d;
double e=sqrt((a - c)*(a - c) + (b - d)*(b - d));
double f=fabs(a - c) +fabs(b - d);
double g=fabs(e - f);
cout << fixed << setprecision(7) << g;
return 0;
}
