摘要: ShoppingProblem Description You have just moved into a new apartment and have a long list of items you need to buy. Unfortunately, to buy thi... 阅读全文
posted @ 2016-11-13 22:28 抽空的太阳 阅读(136) 评论(0) 推荐(0) 编辑
摘要: find the most comfortable roadProblem Description XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure—超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了... 阅读全文
posted @ 2016-11-13 21:44 抽空的太阳 阅读(153) 评论(0) 推荐(0) 编辑
摘要: The Unique MSTDescription Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Con... 阅读全文
posted @ 2016-11-13 17:13 抽空的太阳 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 城堡问题描述: 给定一张n个点m条边的无向连通图,每条边有边权。我们需要从m条边中 选出n−1条,构成一棵树。记原图中从 1 号点到每个节点的最短路径长度为di,树中从 1 号点到每个节点的最短路径长度为? ? ,构出的树应当满足对于任意节点si,都有di=si。 请你求出选出n−... 阅读全文
posted @ 2016-11-13 15:32 抽空的太阳 阅读(128) 评论(0) 推荐(0) 编辑