随笔分类 -  图论 --- 树-2生成树(含有向图)

1

hdu 3367 Pseudoforest
摘要:PseudoforestTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1070Accepted Submission(s): 417 Problem DescriptionIn graph theory, a pseudoforest is an undirected graph in which every connected component has at most one cycle. The maximal pseudofore 阅读全文

posted @ 2013-07-09 19:21 江财小子 阅读(307) 评论(0) 推荐(0) 编辑

poj 2421 Constructing Roads
摘要:Constructing RoadsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16528 Accepted: 6733DescriptionThere 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 connec... 阅读全文

posted @ 2012-11-12 15:39 江财小子 阅读(379) 评论(0) 推荐(0) 编辑

zoj 1718 Building a Space Station
摘要:Building a Space StationTime Limit: 2 Seconds Memory Limit: 65536 KBYou 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 space station is made up with a n... 阅读全文

posted @ 2012-11-12 15:36 江财小子 阅读(395) 评论(0) 推荐(0) 编辑

zoj 1203 Swordfish
摘要:SwordfishTime Limit: 2 Seconds Memory Limit: 65536 KBThere exists a world within our worldA world beneath what we call cyberspace.A world protected by firewalls,passwords and the most advancedsecurity systems.In this world we hideour deepest secrets,our most incriminating inform... 阅读全文

posted @ 2012-11-12 15:31 江财小子 阅读(375) 评论(0) 推荐(0) 编辑

POJ 3026 Borg Maze
摘要:P - Borg MazeTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusAppoint description:DescriptionThe Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciou... 阅读全文

posted @ 2012-11-12 15:29 江财小子 阅读(209) 评论(0) 推荐(0) 编辑

POJ 1258 Agri-Net
摘要:O - Agri-Net Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit StatusAppoint description:DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. F 阅读全文

posted @ 2012-11-12 15:24 江财小子 阅读(153) 评论(0) 推荐(0) 编辑

ZOJ 2048 Highways
摘要:N - HighwaysTime Limit:5000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit StatusAppoint description:DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and ... 阅读全文

posted @ 2012-11-12 15:21 江财小子 阅读(238) 评论(0) 推荐(0) 编辑

ZOJ 1914 Arctic Network
摘要:M - Arctic Network Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Submit StatusAppoint description:DescriptionThe Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in 阅读全文

posted @ 2012-11-12 15:18 江财小子 阅读(188) 评论(0) 推荐(0) 编辑

ZOJ 2158 Truck History
摘要:L - Truck HistoryTime Limit:5000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit StatusAppoint description:DescriptionAdvanced 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 ow... 阅读全文

posted @ 2012-11-12 15:15 江财小子 阅读(211) 评论(0) 推荐(0) 编辑

zoj 1586 QS Network
摘要:QS NetworkTime Limit: 2 Seconds Memory Limit: 65536 KBSunny Cup 2003 - Preliminary RoundApril 20th, 12:00 - 17:00Problem E: QS Network In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each other via networks. If two QS want to get connecte... 阅读全文

posted @ 2012-11-12 15:14 江财小子 阅读(332) 评论(0) 推荐(0) 编辑

hdu 4009 Transfer water
摘要:Transfer waterTime Limit: 5000/3000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2397Accepted Submission(s): 887Problem DescriptionXiaoA lives in a village. Last year flood rained the village. So they decide to move the whole village to the mountain nearby this year. 阅读全文

posted @ 2012-08-29 19:55 江财小子 阅读(344) 评论(0) 推荐(0) 编辑

POJ 3164 Command Network
摘要:Command NetworkTime Limit: 1000MSMemory Limit: 131072KTotal Submissions: 8780Accepted: 2569DescriptionAfter a long lasting war on words, a war on arms finally breaks out between littleken’s and KnuthOcean’s kingdoms. A sudden and violent assault by KnuthOcean’s force has rendered a total failure of 阅读全文

posted @ 2012-08-28 16:29 江财小子 阅读(563) 评论(0) 推荐(0) 编辑

POJ 1679 The Unique MST
摘要:The Unique MSTTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 15153Accepted: 5241DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of 阅读全文

posted @ 2012-08-27 10:21 江财小子 阅读(135) 评论(0) 推荐(0) 编辑

HDU 3371 Connect the Cities
摘要:Connect the CitiesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4014Accepted Submission(s): 1193Problem Description In 2100, since the sea level rise, most of the cities disappear. Though some survived cities are still connected with others, but. 阅读全文

posted @ 2012-07-16 10:11 江财小子 阅读(416) 评论(0) 推荐(0) 编辑

POJ 1287 Networking
摘要:NetworkingTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 4457Accepted: 2421DescriptionYou 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 of point 阅读全文

posted @ 2012-07-15 18:08 江财小子 阅读(170) 评论(0) 推荐(0) 编辑

POJ 2560 Freckles
摘要:FrecklesTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5217Accepted: 2706DescriptionIn an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad's back to form a picture of the Liberty Bell. Alas, one of the freckles turns out to be a scar, so his Ripley' 阅读全文

posted @ 2012-07-13 09:20 江财小子 阅读(293) 评论(0) 推荐(0) 编辑

POJ 1861 Network
摘要:NetworkTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 10104Accepted: 3796Special JudgeDescriptionAndrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other using cables. Since 阅读全文

posted @ 2012-07-12 16:25 江财小子 阅读(240) 评论(0) 推荐(0) 编辑

HDU 1863 还是畅通工程
摘要:省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。Input测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( < 100 );随后的 N 行对应村庄间道路的成本,每行给出一对正整数,分别是两个村庄的编号,以及此两村庄间道路的成本(也是正整数)。为简单起见,村庄从1到M编号。当N为0时,全部输入结束,相应的结果不要输出。Output对每个测试用例,在1行里输出全省畅通需要 阅读全文

posted @ 2012-04-04 09:58 江财小子 阅读(208) 评论(0) 推荐(0) 编辑

HDU 1301 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, so the large road network is too expensive to maintain. The Council of Elders must choose to stop main 阅读全文

posted @ 2012-04-03 22:20 江财小子 阅读(155) 评论(0) 推荐(0) 编辑

HDU 1233 还是畅通工程
摘要:某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给出一对正整数,分别是两个村庄的编号,以及此两村庄间的距离。为简单起见,村庄从1到N编号。当N为0时,输入结束,该用例不被处理。Output对每个测试用例,在1行里输出最小的公路总长度。Sample Input3 1 阅读全文

posted @ 2012-04-02 21:47 江财小子 阅读(206) 评论(0) 推荐(0) 编辑

1
点击右上角即可分享
微信分享提示