poj 3159 Candies
来源:互联网 发布:linux在终端中打开rpm 编辑:程序博客网 时间:2024/04/30 10:32
差分约束。
需要优化,SPFA+queue TLE了 = =。。。SPFA+stack 700+MS,Dijkstra + priority_queue 500MS..
以前没用过栈,记得就用过一次WA了,以后再也没用过。这次就把队列改成栈,Q.front() 改成Q.top()就过了,仰慕啊。。。
用邻接表越来越顺啦,(*^__^*) 嘻嘻……
这题是建图后求1到N的最大距离。以1为源点。建图后求最短路即可。
SPFA+stack
Dijkstra+priority_queue
- poj 3159 Candies
- POJ 3159 Candies
- poj 3159 Candies
- POJ 3159 candies总结
- POJ 3159 Candies
- POJ 3159 Candies
- poj 3159-Candies
- POJ-3159-Candies
- POJ 3159 Candies
- POJ 3159 Candies
- poj 3159 Candies
- POJ 3159 Candies
- poj 3159 Candies
- POJ -- 3159 Candies
- poj 3159 Candies
- Candies ( POJ 3159)
- poj 3159 Candies
- POJ 3159 Candies
- 中国互联网企业区域地图
- 串口通讯流控制
- POJ1089解题报告 区间合并
- POJ2876解题报告 递归
- csdn,我来了
- poj 3159 Candies
- gdb 调试-1
- poj 1273 Drainage Ditches
- 用CMake写一个简单的交叉编译测试工程
- 1740
- poj 1274 The Perfect Stall
- 1003:max sum
- 集合 - 1
- CSDN