本地Devc++编译成功,但在洛谷上编译失败,真的是服了。求大佬指点。
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int x1, y1, x2, y2;
int main()
{
cin >> x1 >> y1 >> x2 >> y2;
cout << fixed << setprecision(3) << sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) << endl;
return 0;
}