摘要: 题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2420代码:View Code 1 #include<stdio.h> 2 struct node 3 { 4 int x; 5 int l1;//记录i点左面1的数目 6 int l2;//记录i点左面2的数目 7 }a[30010]; 8 int main() 9 {10 int i,n,max,sum;11 scanf("%d",&n);12 a[0].l1=0;13 a[0].l2... 阅读全文
posted @ 2012-08-22 21:10 琳&leen 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2421利用最小生成树求出总权值×2 - 最大的叶子节点所经路径的权值View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #define inf 0x3f3f3f 5 using namespace std; 6 int b[110][110]; 7 void prim(int n) 8 { 9 int 阅读全文
posted @ 2012-08-22 20:48 琳&leen 阅读(162) 评论(0) 推荐(0) 编辑