最短路
文章平均质量分 70
Neiloz
...
展开
-
Currency Exchange POJ - 1860(前向星存图+spfa+判断负环)
Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can原创 2017-11-02 22:16:28 · 356 阅读 · 0 评论 -
Candies POJ - 3159(差束约分理解 spfa+stack速度比queue+spfa 快)
During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. All the原创 2017-11-06 20:45:41 · 344 阅读 · 1 评论 -
SP,MST模板
最短路模板,Dijkstra,spfa算法,没有Floyd算法的,模板最小生成树算法只有prim没有克鲁斯卡尔算法:* 一点点的说明: 代码中引入了二元组:pair(目的辅助算法的实现,存储部分相关信息),以及优先队列priority_queue(实现快速查找,即所谓的堆排序,返回现有里的最小值) *总代码: 题目: sdutacm 2143 2144 :所需要...原创 2018-03-14 19:47:58 · 299 阅读 · 0 评论