
图论——k短路
Alex_McAvoy
想要成为渔夫的猎手
展开
-
图论 —— k 短路
【概述】所谓 k 短路问题,是指给定一个具有 n 个点 m 条边的带正权有向图,再给定起点 S 与终点 T,询问从 S 到 T 的所有权和中,第 k 短的路径的长度。k 短路问题的解决方法有两种,一种是利用A*算法求解,另一种是利用最短路算法与可持久化堆结合求解。【A*算法】对于 Dijkstra 算法,有一个结论是:当一个点第 k 次出队的时候,此时路径长度就是 s 到它的第 k...转载 2019-10-11 15:38:37 · 5098 阅读 · 0 评论 -
Remmarguts' Date(POJ-2449)(可持久化堆解决)
Problem Description"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story."Prince Remmarguts live...原创 2019-10-12 15:52:14 · 335 阅读 · 0 评论 -
Remmarguts' Date(POJ-2449)(A*解决)
Problem Description"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story."Prince Remmarguts live...原创 2019-10-12 11:36:10 · 438 阅读 · 0 评论