文章分类 - 最小生成树与最短路径
摘要:After a long time of algorithm training, we want to hold a running contest in our beautiful campus. Because all of us are curious about a coders's fie
阅读全文
摘要:Brent hasn’t go out for a long time, so he is eager to go travelling. There are many cities he wants to visit, and he decides to visit all of them. Wh
阅读全文
摘要:Description 年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球
阅读全文
摘要:Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them to be his sol
阅读全文
摘要:省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每个
阅读全文
摘要:某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出
阅读全文
摘要:A skyscraper has no more than 100 floors, numbered from 0 to 99. It has n (1 ≤ n ≤ 5) elevatorswhich travel up and down at (possibly) different speeds.
阅读全文
摘要:While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path tha
阅读全文

浙公网安备 33010602011771号