1815[Distance]
来源:互联网 发布:查看ubuntu详细版本 编辑:程序博客网 时间:2024/06/06 19:49
求两个坐标点的距离- -
主要是输出保证有两个小数点~
#include<iostream>#include<cmath>#include <iomanip>using namespace std;int main(){int n;double x1, y1 ,x2, y2;double y;cin >> n;while( n-- ){cin >> x1 >> y1 >> x2 >> y2;y = (x1-x2) * ( x1-x2 ) + (y1-y2) * (y1-y2);y = sqrt( y );cout << setiosflags( ios::fixed ) << setprecision( 2 );cout << y << endl;}return 0;}
搞定~
什么时候才能刷题刷成小牛呢[叹气]
- 1815[Distance]
- Distance
- distance
- distance
- Distance
- Edit Distance (Levenshtein Distance)
- Levenshtein distance(Edit distance)
- Distance mapping
- Levenshtein Distance
- Hamming Distance
- Levenshtein Distance
- edit distance
- distance transform
- Diffussion Distance
- Distance metric
- Levenshtein distance
- distance函数
- Edit Distance
- mysql的备份和还原
- 使用命令行编译VC++程序
- display常用属性及inline元素之间的空白和padding的问题
- 基友记
- Java中说引用传递-这是不准确的
- 1815[Distance]
- mysql加密函数
- Hibernate的检索方式(一)
- test
- Oracle - SGA → Data_buffer_cache 之 Keep pool
- C++单例模式与线程安全
- 10491 - Cows and Cars (概率)
- 博客第一天,以后会多多交流的!
- oracle建立用户、表空间,给用户分配权限并分配表空间