图论
文章平均质量分 86
Hawkeye_z
不足之处请多多指教
展开
-
Dijkstra(优先队列优化)
/*Dijkstra的算法思想:在所有没有访问过的结点中选出dis(s,x)值最小的x对从x出发的所有边(x,y),更新dis(s,y)=min(dis(s,y),dis(s,x)+dis(x,y))*/#include <iostream>#include <cstdio>#include <queue>#include <vector>using namespace std;转载 2015-08-10 14:19:00 · 1028 阅读 · 0 评论 -
hdu2680 Choose the best route 最短路,超级起点(多源Dijkstra算法,)
Hdu 2690 Choose the best route原创 2015-08-10 19:46:31 · 534 阅读 · 0 评论 -
Hdu 2066 一个人的旅行(dijkstra算法,超级起点)
HDU 2066一个人的旅行原创 2015-08-10 19:16:06 · 729 阅读 · 0 评论 -
Hdu 2066 一个人的旅行(dijkstra算法)
Hdu 2066 一个人的旅行原创 2015-08-06 12:49:53 · 469 阅读 · 0 评论 -
POJ3159Candies(差分约束系统)
DescriptionDuring 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 the原创 2015-11-03 20:50:19 · 546 阅读 · 0 评论 -
POJ1201(Hdu1384) Intervals差分约束系统
DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, …, cn. Write a program that: reads the number of intervals, their endpoints and integers c1, …, cn from the standard原创 2015-11-17 15:44:50 · 485 阅读 · 0 评论 -
POJ1062昂贵的聘礼
Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:”嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。”探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者原创 2015-11-02 19:59:16 · 436 阅读 · 0 评论