2012年4月18日
摘要: View Code /* Name: 利用kruskal算法的过程 Copyright: Author: Try86 Date: 18/04/12 20:58 Description: 求所有从起点到终点的路径上的最小边权的最大值 */#include <cstdio>#include <cstdlib>#include <iostream>using namespace std;const int N = 1005;const int M = 1000005;int p[N], n, m;struct edge { int u; int v; int w; 阅读全文
posted @ 2012-04-18 21:05 Try86 阅读(151) 评论(0) 推荐(0)
摘要: View Code /* Name: 利用kruskal的过程+hash+二分 Copyright: (处理字符串我写复杂了!) Author: Try86 Date: 18/04/12 20:26 Description: 求连接两点的路径上的最小边权的最大值 */#include <cstdio>#include <cstdlib>#include <cstring>#include <iostream>using namespace std;const int L = 35;const int S = 331;//hash表大小 const 阅读全文
posted @ 2012-04-18 20:39 Try86 阅读(160) 评论(0) 推荐(0)
摘要: View Code /* Name: 最短路(bellmanFord) Copyright: Author: Try86 Date: 18/04/12 13:50 Description: 判断是否从某一种货币出发经过一系列的转换后回到自身时,货币币值增加 */#include <cstdio>#include <cstring>#include <cstdlib>#include <iostream>using namespace std;const int N = 35;const int M = 1000;double d[N];char 阅读全文
posted @ 2012-04-18 17:32 Try86 阅读(178) 评论(0) 推荐(0)