随笔分类 -  图的连通问题

POJ1659 Frogs' Neighborhood
摘要:POJ1659 Frogs' NeighborhoodTime Limit:5000MSMemory Limit:10000KTotal Submissions:3994Accepted:1716Special JudgeDescription未名湖附近共有N个大小湖泊L1,L2, ...,Ln(其中包括未名湖),每个湖泊Li里住着一只青蛙Fi(1 ≤i≤N)。如果湖泊Li和Lj之间有水路相连,则青蛙Fi和Fj互称为邻居。现在已知每只青蛙的邻居数目x1,x2, ...,xn,请你给出每两个湖泊之间的相连关系。Input第一行是测试数据的组数T(0 ≤T≤ 20)。每组数据包括两行,第一 阅读全文

posted @ 2011-10-27 15:40 Fatedayt 阅读(999) 评论(0) 推荐(0)

POJ1904 King's Quest
摘要:POJ1904 King's QuestTime Limit:15000MSMemory Limit:65536KTotal Submissions:4537Accepted:1533Case Time Limit:2000MSDescriptionOnce upon a time there lived a king and he had N sons. And there were N beautiful girls in the kingdom and the king knew about each of his sons which of those girls he did 阅读全文

posted @ 2011-10-14 11:09 Fatedayt 阅读(1058) 评论(0) 推荐(0)

HDU1269 迷宫城堡
摘要:HDU1269 迷宫城堡Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2092Accepted Submission(s): 886Problem Description为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Ga 阅读全文

posted @ 2011-09-19 21:08 Fatedayt 阅读(2362) 评论(0) 推荐(0)

POJ2942 Knights of the Round Table
摘要:POJ2942 Knights of the Round TableTime Limit:7000MSMemory Limit:65536KTotal Submissions:4968Accepted:1543DescriptionBeing a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other knights are fun things to do. Therefore, it is not ver 阅读全文

posted @ 2011-09-19 20:30 Fatedayt 阅读(557) 评论(0) 推荐(0)

POJ1523 SPF
摘要:POJ1523 SPFTime Limit:1000MSMemory Limit:10000KTotal Submissions:2869Accepted:1284DescriptionConsider the two networks shown below. Assuming that data moves around these networks only between directly connected nodes on a peer-to-peer basis, a failure of a single node, 3, in the network on the left 阅读全文

posted @ 2011-09-19 18:29 Fatedayt 阅读(847) 评论(0) 推荐(1)

HDU4005 The war
摘要:HDU4005 The warTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 775 Accepted Submission(s): 128Problem DescriptionIn the war, the intelligence about the enemy is very important. Now, our troop has mastered the situation of the enemy's war zones 阅读全文

posted @ 2011-09-18 15:49 Fatedayt 阅读(510) 评论(0) 推荐(0)

POJ1236 Network of Schools
摘要:POJ1236 Network of SchoolsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5649 Accepted: 2236DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (t.. 阅读全文

posted @ 2011-09-16 18:35 Fatedayt 阅读(422) 评论(0) 推荐(0)

POJ2186 Popular Cows
摘要:POJ2186 Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14474 Accepted: 5747DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= 50,000) ordered pairs of the form (A, 阅读全文

posted @ 2011-09-16 16:17 Fatedayt 阅读(1612) 评论(0) 推荐(0)

导航