摘要: DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight river with a rock at the start and another rock at the end, L units away from the start (1 ≤ L ≤ 1,000,0 阅读全文
posted @ 2012-02-19 18:56 Chnwy 阅读(505) 评论(0) 推荐(0) 编辑
摘要: DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It was decided to connect computers for the contestants using a "star" topology - i.e. connect them 阅读全文
posted @ 2012-02-19 15:54 Chnwy 阅读(1014) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven 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, say T = (V', E'), with the following properties:1. V' = V.2. T is connected 阅读全文
posted @ 2012-02-19 10:01 Chnwy 阅读(279) 评论(0) 推荐(1) 编辑