摘要: RoadblocksTime Limit:2000MSMemory Limit:65536KTotal Submissions:5256Accepted:2013DescriptionBessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly, because she likes the scenery along the way. She has dec 阅读全文
posted @ 2013-05-01 23:11 Jack Ge 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 1.定义:割点:某个点是割点当且仅当删除该点和与该点相关联的边后图变得不连通。桥(割边):某条边是割边当且仅当删除该边后图变的不连通。双连通分支:图G的所有子图G'中,如果G'是连通的,则称G'是双连通子图。如果G'不是任何一个连通子图的真子图,那么图G'是双连通分支。特别的,点双连通分支又叫做块。2.求割点,桥对原图进行深度优先搜索,会生成一颗深度优先搜索生成树。定义dfs[u]为u在深度优先搜索生成树中被遍历到的序号,low[u]为u或者他的子树中可以通过非父子边追溯到的最早结点。那么一个顶点是割点,满足下列条件之一:1).u是树根,u有两个或两个以 阅读全文
posted @ 2013-05-01 22:41 Jack Ge 阅读(449) 评论(0) 推荐(0) 编辑
摘要: NetworkTime Limit:1000MSMemory Limit:10000KTotal Submissions:7510Accepted:3525DescriptionA Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N . No two places have the same number. The lines are bidirectional 阅读全文
posted @ 2013-05-01 22:36 Jack Ge 阅读(2723) 评论(0) 推荐(0) 编辑
摘要: Redundant PathsTime Limit:1000MSMemory Limit:65536KTotal Submissions:6982Accepted:3042DescriptionIn order to get from one of the F (1 <= F <= 5,000) grazing fields (which are numbered 1..F) to another field, Bessie and the rest of the herd are forced to cross near the Tree of Rotten Apples. Th 阅读全文
posted @ 2013-05-01 22:21 Jack Ge 阅读(470) 评论(0) 推荐(0) 编辑
摘要: ElectricityTime Limit:5000MSMemory Limit:65536KTotal Submissions:2515Accepted:839DescriptionBlackouts and Dark Nights (also known as ACM++) is a company that provides electricity. The company owns several power plants, each of them supplying a small area that surrounds it. This organization brings a 阅读全文
posted @ 2013-05-01 22:06 Jack Ge 阅读(592) 评论(0) 推荐(0) 编辑
摘要: King Arthur's KnightsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1358Accepted Submission(s): 583Special JudgeProblem DescriptionI am the bone of my sword. Steel is my body, and the fire is my blood.- from Fate / Stay NightYou must have know 阅读全文
posted @ 2013-05-01 21:48 Jack Ge 阅读(346) 评论(0) 推荐(0) 编辑
摘要: Problem F: [USACO 3.1.6]邮票http://www.acmore.net/problem.php?id=1084Time Limit:1 SecMemory Limit:64 MBSubmit:35Solved:13SubmitStatusWeb BoardDescription已知一个 N 枚邮票的面值集合(如,{1 分,3 分})和一个上限 K —— 表示信封上能够贴 K 张邮票。计算从 1 到 M 的最大连续可贴出的邮资。 例如,假设有 1 分和 3 分的邮票;你最多可以贴 5 张邮票。很容易贴出 1 到 5 分的邮资(用 1 分邮票贴就行了),接下来的邮资也不难: 阅读全文
posted @ 2013-05-01 19:08 Jack Ge 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Problem H: [USACO 2.3.4]货币系统http://www.acmore.net/problem.php?cid=1012&pid=7Time Limit:1 SecMemory Limit:64 MBSubmit:42Solved:23SubmitStatusWeb BoardDescription母牛们不但创建了他们自己的政府而且选择了建立了自己的货币系统。 [In their own rebellious way],,他们对货币的数值感到好奇。传统地,一个货币系统是由1,5,10,20 或 25,50, 和 100的单位面值组成的。母牛想知道有多少种不同的方法来 阅读全文
posted @ 2013-05-01 18:50 Jack Ge 阅读(1278) 评论(0) 推荐(0) 编辑
摘要: Big Christmas TreeTime Limit:3000MSMemory Limit:131072KTotal Submissions:18303Accepted:3881DescriptionChristmas is coming to KCM city. Suby the loyal civilian in KCM city is preparing a big neat Christmas tree. The simple structure of the tree is shown in right picture.The tree can be represented as 阅读全文
posted @ 2013-05-01 18:22 Jack Ge 阅读(468) 评论(0) 推荐(0) 编辑
摘要: Fiber NetworkTime Limit:1000MSMemory Limit:65536KTotal Submissions:2660Accepted:1221DescriptionSeveral startup companies have decided to build a better Internet, called the "FiberNet". They have already installed many nodes that act as routers all around the world. Unfortunately, they star 阅读全文
posted @ 2013-05-01 15:58 Jack Ge 阅读(448) 评论(0) 推荐(0) 编辑
摘要: Play on WordsTime Limit:1000MSMemory Limit:10000KTotal Submissions:7970Accepted:2802DescriptionSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very important 阅读全文
posted @ 2013-05-01 15:42 Jack Ge 阅读(611) 评论(1) 推荐(0) 编辑
摘要: The Unique MSTTime Limit:1000MSMemory Limit:10000KTotal Submissions:16690Accepted:5782DescriptionGiven 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 G, s 阅读全文
posted @ 2013-05-01 15:05 Jack Ge 阅读(503) 评论(0) 推荐(0) 编辑
摘要: Optimal MilkingTime Limit:2000MSMemory Limit:30000KTotal Submissions:9498Accepted:3433Case Time Limit:1000MSDescriptionFJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of paths of various lengths runs among the cows and 阅读全文
posted @ 2013-05-01 14:49 Jack Ge 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 1508: ZZ’s Fibonacci Problemhttp://www.acmore.net/problem.php?id=1508Time Limit:1 SecMemory Limit:64 MBSubmit:67Solved:14SubmitStatusWeb BoardDescription ZZ is a big fan of Fibonacci numbers, and she pays lots of attention on Fibonacci numbers, Fibonacci numbers have the following form: F(1) = 1, .. 阅读全文
posted @ 2013-05-01 13:36 Jack Ge 阅读(349) 评论(0) 推荐(0) 编辑