摘要: http://poj.org/problem?id=1789模板题 题意是一个字符串跟一个字符不同的字符串有多少 这个数量就相当于权值 连起来最小View Code 1 #include <iostream> 2 #include<algorithm> 3 #include<string.h> 4 #include<cstdio> 5 #define INF 0x3f3f3f3f 6 using namespace std; 7 char c[2001][10]; 8 int w[2001][2001],vis[2001],low[2001],s 阅读全文
posted @ 2012-08-06 20:04 _雨 阅读(178) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1879prime算法View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<string.h> 4 #define INF 0x3f3f3f3f 5 using namespace std; 6 int w[101][101],visit[101],low[101],sum = 0; 7 void prime(int n) 8 { 9 int i,j,k,m;10 memset(visit,0,sizeof 阅读全文
posted @ 2012-08-06 17:01 _雨 阅读(218) 评论(0) 推荐(0) 编辑