书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

2011年10月3日

Dijkstra解决POJ 2263

摘要: 题目:http://poj.org/problem?id=2263题目大意:有n个城市,r条连接两个城市的道路,每条道路有自己的最大复载量。现在问从城市cst到城市cen,车上的最大载重能为多少。虽然是提交了,也搞懂了,但是还没有彻底的明白。因此,也不便多说什么,当我彻底明白的时候再说吧。呵呵,终于完全的明白了,下面指出一二。1.一定要明白map[][]的双关性,何为双关? (1).map[i][j]表示i到j的距离 (2).map[i][j]=0表示i到j不可以直接可达 要达到这种效果,首先将map[][]全部赋值为0, 然后存储建图,在建图的过程中自然的将直接可达 的两点赋值为不... 阅读全文

posted @ 2011-10-03 22:21 More study needed. 阅读(1201) 评论(2) 推荐(2) 编辑

Floyd算法解决POJ 1603

摘要: DescriptionRisk is a board game in which several opposing players attempt to conquer the world. The gameboard consists of a world map broken up into hypothetical countries. During a player's turn, armies stationed in one country are only allowed to attack only countries with which they share a c 阅读全文

posted @ 2011-10-03 19:42 More study needed. 阅读(539) 评论(0) 推荐(0) 编辑

导航

书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!