摘要: 题目:http://poj.org/problem?id=1258题意:模板题 和2485差不多 就是求相连后的最小值。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 int bin[110];11 struct node12 {13 int u,v,w;14 } q[30000];15 bool cmp(node x,node y)16 {17 return x.w... 阅读全文
posted @ 2013-08-03 15:19 水门 阅读(276) 评论(0) 推荐(0)
摘要: 这题挺无语啊,在poj上交c++就wrong,用cin输入就会TLE;看来以后要交G++,用scanf输入了题目:http://poj.org/problem?id=2485题意:求最小生成树的边的最长边 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 int bin[510];11 struct node12 {13 int u,v,w;14 } q[251000];15 boo... 阅读全文
posted @ 2013-08-03 11:17 水门 阅读(236) 评论(0) 推荐(0)
摘要: 模板题题目:http://poj.org/problem?id=1789题意:有n个型号,每个型号有7个字母代表其型号,每个型号之间的差异是他们字符串中对应字母不同的个数d[ta,tb]代表a,b之间的差异数问1/Σ(to,td)d(to,td)最大值prime: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 int grah[2100][2100];12 int sum=0;13 void pim(int . 阅读全文
posted @ 2013-08-03 09:31 水门 阅读(192) 评论(0) 推荐(0)