Problem B Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 10 Accepted Submission(s) : 7 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Eddy begins to like painting…
并查集+最小生成树 Eddy's picture Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7669 Accepted Submission(s): 3882 Problem Description Eddy begins to like painting pictures recently ,he is sure of hi…
Eddy's picture Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8797 Accepted Submission(s): 4476 Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to b…
Eddy's picture Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5797 Accepted Submission(s): 2913 Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1301 将结点的字符信息处理成点信息即可,代码如下: #include<bits/stdc++.h> using namespace std; typedef unsigned int ui; typedef long long ll; typedef unsigned long long ull; #define pf printf #define mem(a,b) memset(a,b,size…
Eddy's picture 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1162 ——每天在线,欢迎留言谈论. 题目大意: 给你N个点,求把这N个点连在一起的最短总距离. 思路: 假设每两两点之间都有路径,求最小生成树. AC代码:(Java) import java.util.Scanner; import java.math.*; public class Main { public static final int MAXN = 110;…
题目链接 Problem Description Eddy 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 res…
链接: http://acm.hdu.edu.cn/showproblem.php?pid=1162 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8303 Accepted Submission(s): 4214 Problem Description Eddy begins to like painting pictures…
Eddy's picture Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6339 Accepted Submission(s): 3179 Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to b…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1162 Eddy's picture Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6866 Accepted Submission(s): 3469 Problem Description Eddy begins to like p…
题目链接 Problem Description Eddy 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 res…
Tree Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1954 Accepted Submission(s): 573 Problem Description There are N (2<=N<=600) cities,each has a value of happiness,we consider two cities…
Fibonacci Tree Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2915 Accepted Submission(s): 931 Problem Description Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1233 可以用Kruskal来做,不过当图的边比较稠密的时候用prime会更快一些. AC代码:296MS #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int inf=0xffffff; int dis[105],sum,n; int weight[105]…
题目: http://acm.hdu.edu.cn/showproblem.php?pid=1863 注意有可能出现无法生成树的情况. #include <iostream> #include <cstring> using namespace std; const int inf=0xffffff; int weight[105][105],n,m; int prime() { int sum=0; int pre[105]; int dis[105]; bool visit[1…
Ice_cream's world III Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1237 Accepted Submission(s): 408 Problem Description ice_cream's world becomes stronger and stronger; every road is buil…
Problem Description In 2100, since the sea level rise, most of the cities disappear. Though some survived cities are still connected with others, but most of them become disconnected. The government wants to build some roads to connect all of these c…
Problem Description Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to solve the following problem:Consider a bidirectional graph G with N vertices and M edges. All…