摘要:
http://dongxicheng.org/structure/union-find-set/ 阅读全文
摘要:
浓缩prim的模板 Connect the CitiesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7278Accepted Submission(s): 2079 Problem DescriptionIn 2100, since the sea level rise, most of the cities disappear. Though some survived cities are still connected with o 阅读全文
摘要:
应用了prim算法模板,一下子就过了。 畅通工程Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13084Accepted Submission(s): 5358 Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。Inpu 阅读全文
摘要:
继续畅通工程Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10738Accepted Submission(s): 4691 Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。Input测试输入包. 阅读全文
摘要:
prim 算法求最小生成树 还是畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 20712Accepted Submission(s): 9213 Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测. 阅读全文
摘要:
hdu 1874比较基础,拿来练各种刚学会的算法比较好,可以避免好多陷阱,典型的最短路模板题 畅通工程续Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 21028Accepted Submission(s): 7310 Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人. 阅读全文
摘要:
1 import java.awt.*; 2 import java.awt.event.*; 3 public class calculator//一个类。 4 { 5 public static void main(String args[])//主函数。 6 { 7 MyWindow my=new MyWindow("计算器"); //设置框架标题 8 } 9 } 10 class MyWindow extends Frame implements ActionListener 11 { StringBuffer m=new StringBuffer();//创... 阅读全文
摘要:
Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part of the problem is determi 阅读全文
摘要:
排列2Time Limit : 1000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 15Accepted Submission(s) : 12Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionRay又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。Input每组数据占一行,代表四张卡片上的数字(0 2 #include 3 in. 阅读全文
摘要:
Oil DepositsTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 15Accepted Submission(s) : 14Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposit. 阅读全文