problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
luogu::P5735类 参考

洛谷 P5735 【深基7.例1】距离函数 更多...

#include <luogu.h>

静态 Public 成员函数

static int main (istream &cin, ostream &cout)
 

详细描述

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

在文件 luogu.h591 行定义.

成员函数说明

◆ main()

int luogu::P5735::main ( istream &  cin,
ostream &  cout 
)
static

在文件 luogu.cpp2258 行定义.

2258 {
2259 double x1;
2260 double y1;
2261 double x2;
2262 double y2;
2263 double x3;
2264 double y3;
2265 cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
2266 const double d12 = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
2267 const double d23 = sqrt(pow(x3 - x2, 2) + pow(y3 - y2, 2));
2268 const double d13 = sqrt(pow(x3 - x1, 2) + pow(y3 - y1, 2));
2269 cout << fixed << setprecision(2) << d12 + d23 + d13;
2270 return 0;
2271 }

被这些函数引用 luogu::TEST().


该类的文档由以下文件生成: