0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-25 05:11:59 +00:00

P5735 【深基7.例1】距离函数

R38740507
This commit is contained in:
Baoshuo Ren 2020-09-22 19:07:40 +08:00 committed by Baoshuo Ren
parent fd5878954f
commit 9f8017f2a5
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

11
problem/P5735/P5735.cpp Normal file
View File

@ -0,0 +1,11 @@
// R38740507
#include <bits/stdc++.h>
using namespace std;
int main() {
double x1, y1, x2, y2, x3, y3;
scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3), printf("%.2lf\n", sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) + sqrt((x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3)) + sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)));
return 0;
}