题解 | 绕距
绕距
https://www.nowcoder.com/practice/7a245fc6284f4139b4fb21de58e68483
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
long double x[2],y[2];
cin>>x[0]>>y[0];
cin>>x[1]>>y[1];
cout << setprecision(18) <<(fabs(x[0]-x[1]) + fabs(y[0]-y[1]) - hypot(x[0]-x[1], y[0]-y[1])) << endl;
}
