随笔分类 -  图论模板

摘要:Problem DescriptionFor a tree, which nodes and edges are all weighted, the ratio of it is calculated according to the following equation.Given a complete graph of n nodes with all nodes and edges weighted, your task is to find a tree, which is a sub-graph of the original graph, with m nodes and whos 阅读全文
posted @ 2013-09-13 20:56 欧阳生朵 阅读(570) 评论(0) 推荐(0)
摘要:Problem DescriptionThis is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algoritmo. If you do not understand a word of this paragraph, just move on.The Nya graph is an undirected graph with "layers". Each node i 阅读全文
posted @ 2013-09-11 20:56 欧阳生朵 阅读(804) 评论(0) 推荐(0)
摘要:Problem 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. There is no spring in the mountain, so each household could only dig a well or build a water line from other household. If the household decide 阅读全文
posted @ 2013-09-10 18:05 欧阳生朵 阅读(209) 评论(0) 推荐(0)