最短路
文章平均质量分 77
wxfwxf328
这个作者很懒,什么都没留下…
展开
-
hdu 3790 最短路径问题 【双权值最短路(相同最小距离,求最小花费)】
//注释为CIN/COUT版,cin.sync_with_stdio(false)一定要有,不然会超时#include using namespace std; const int maxn=1000+10; //点数 const int maxm=1000000+10; //边数 const int inf=0x3f3f3f3f; typedef pair elem_t; inlin原创 2012-01-20 15:25:36 · 2153 阅读 · 0 评论 -
hdu 2112 HDU Today 字典树+Dijkstra
#include #include #include #define th(a) this->a=a using namespace std; const int maxn=150+10; const int inf=0x3f3f3f3f; struct trie_t{ int lnk[64],val; void init() { memset(lnk,0,原创 2012-01-20 15:40:02 · 456 阅读 · 0 评论