最小生成树
YRZ-James
who say you are not perfect?
展开
-
I - QS Network
题目:Sunny Cup 2003 - Preliminary RoundApril 20th, 12:00 - 17:00Problem E: QS NetworkIn the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each othe...原创 2019-01-31 12:53:03 · 125 阅读 · 0 评论 -
J - Truck History
题目:Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of ...原创 2019-01-31 14:05:22 · 139 阅读 · 0 评论 -
A - 畅通工程
题目:省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。Input测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( < 100 );随后的 N行对应村庄间道路的成本...原创 2019-01-27 13:54:17 · 256 阅读 · 0 评论 -
B - 继续畅通工程
题目:省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 1< N < 100 );随后的 N(N-...原创 2019-01-27 22:33:31 · 699 阅读 · 0 评论 -
E - Jungle Roads
题目:The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly...原创 2019-01-29 21:30:21 · 181 阅读 · 0 评论 -
F - Networking
题目:You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs ...原创 2019-01-29 22:21:16 · 116 阅读 · 0 评论 -
G - Building a Space Station
题目:You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task.The s...原创 2019-01-30 21:44:35 · 1631 阅读 · 2 评论 -
H - Constructing Roads
题目:There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only ...原创 2019-01-31 09:58:13 · 112 阅读 · 0 评论