HDU1162 Eddy的解题思路是什么?

2026-04-27 19:051阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计489个文字,预计阅读时间需要2分钟。

HDU1162 Eddy的解题思路是什么?

EddysPicture时间限制:2000ms(Java/Others)内存限制:65536K(Java/Others)Eddy的图片时间限制:2000/1000 ms(Java/Others)内存限制:65536/32768 K(Java/Others)总提交次数:6723总接受次数:未知

EddyspictureTimeLimit:20001000MS(JavaOthers)    MemoryLimit:6553632768K(JavaOthers)

Eddy‘s picture

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6723    Accepted Submission(s): 3391

Problem DescriptionEddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictures to let his friends appreciate. but the result it can be imagined, the friends are not interested in his picture.Eddy feels very puzzled,in order to change all friends ‘s view to his technical of painting pictures ,so Eddy creates a problem for the his friends of you.Problem descriptions as follows: Given you some coordinates pionts on a drawing paper, every point links with the ink with the straight line, causes all points finally to link in the same place. How many distants does your duty discover the shortest length which the ink draws? 

 

InputThe first line contains 0  

HDU1162 Eddy的解题思路是什么?

OutputYour program prints a single real number to two decimal places: the minimum total length of ink lines that can connect all the points. 

 

Sample Input31.0 1.02.0 2.02.0 4.0 

 

Sample Output3.41

题意:给定n个点的坐标,求将这n个点连起来的最小生成树。

题解:直接套模板。

#include #include #include #define maxn 102double _x[maxn], _y[maxn];double map[maxn][maxn];bool vis[maxn];double cal(int i, int j){double x = _x[i] - _x[j];double y = _y[i] - _y[j];return sqrt(x * x + y * y);}void Prim(int n){int i, j, count = 0, u;double len = 0, tmp;vis[0] = 1;while(count  

HDU1162 Eddys picture ,,

HDU1162 Eddys picture

本文共计489个文字,预计阅读时间需要2分钟。

HDU1162 Eddy的解题思路是什么?

EddysPicture时间限制:2000ms(Java/Others)内存限制:65536K(Java/Others)Eddy的图片时间限制:2000/1000 ms(Java/Others)内存限制:65536/32768 K(Java/Others)总提交次数:6723总接受次数:未知

EddyspictureTimeLimit:20001000MS(JavaOthers)    MemoryLimit:6553632768K(JavaOthers)

Eddy‘s picture

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6723    Accepted Submission(s): 3391

Problem DescriptionEddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictures to let his friends appreciate. but the result it can be imagined, the friends are not interested in his picture.Eddy feels very puzzled,in order to change all friends ‘s view to his technical of painting pictures ,so Eddy creates a problem for the his friends of you.Problem descriptions as follows: Given you some coordinates pionts on a drawing paper, every point links with the ink with the straight line, causes all points finally to link in the same place. How many distants does your duty discover the shortest length which the ink draws? 

 

InputThe first line contains 0  

HDU1162 Eddy的解题思路是什么?

OutputYour program prints a single real number to two decimal places: the minimum total length of ink lines that can connect all the points. 

 

Sample Input31.0 1.02.0 2.02.0 4.0 

 

Sample Output3.41

题意:给定n个点的坐标,求将这n个点连起来的最小生成树。

题解:直接套模板。

#include #include #include #define maxn 102double _x[maxn], _y[maxn];double map[maxn][maxn];bool vis[maxn];double cal(int i, int j){double x = _x[i] - _x[j];double y = _y[i] - _y[j];return sqrt(x * x + y * y);}void Prim(int n){int i, j, count = 0, u;double len = 0, tmp;vis[0] = 1;while(count  

HDU1162 Eddys picture ,,

HDU1162 Eddys picture