HDOJ 2001 計算兩點間的距離

2021-09-24 17:54:38 字數 471 閱讀 2413

problem description

輸入兩點座標(x1,y1),(x2,y2),計算並輸出兩點間的距離。

input

輸入資料有多組,每組佔一行,由4個實數組成,分別表示x1,y1,x2,y2,資料之間用空格隔開。

output

對於每組輸入資料,輸出一行,結果保留兩位小數。

sample input

0 0 0 1 0 1 1 0

sample output

1.00 1.41

#include#include#define _crt_secure_no_warnings

double dist(double a1, double a2, double b1, double b2)

int main()

return 0;

}

HDOJ2001 兩點座標的距離

problem description 輸入兩點座標 x1,y1 x2,y2 計算並輸出兩點間的距離。input 輸入資料有多組,每組佔一行,由4個實數組成,分別表示x1,y1,x2,y2,資料之間用空格隔開。output 對於每組輸入資料,輸出一行,結果保留兩位小數。sample input 0 ...

HDU 2001 計算兩點間的距離

problem description 輸入兩點座標 x1,y1 x2,y2 計算並輸出兩點間的距離。input 輸入資料有多組,每組佔一行,由4個實數組成,分別表示x1,y1,x2,y2,資料之間用空格隔開。output 對於每組輸入資料,輸出一行,結果保留兩位小數。sample input 0 ...

杭電ACM 2001 計算兩點間的距離

problem description 輸入兩點座標 x1,y1 x2,y2 計算並輸出兩點間的距離 input 輸入資料有多組,每組佔一行,由4個實數組成,分別表示x1,y1,x2,y2,資料之間用空格隔開 output 對於每組輸入資料,輸出一行,結果保留兩位小數。sample input 0 ...