2017年3月11日

codeforces 61 D 115 A

摘要: D 从1开始走 走过所有的点 最少的花费 显然 走到叶子节点 最大的费用 不用算 那么就是从根开始走走到叶子的距离处理出来 dis[i] 从根到i 的距离 #include<stdio.h> #include<string.h> #include<algorithm> using namespace 阅读全文

posted @ 2017-03-11 15:08 HelloWorld!--By-MJY 阅读(131) 评论(0) 推荐(0) 编辑

codeforces 25D

摘要: n 个点 n-1条边 不一定是树 要把它变成一棵树 最少要删除几条边 每删除一条边可以在另外地方造一条边 并查集 #include<stdio.h> #include<algorithm> #include<cstring> #include<string> #include<cmath> #inc 阅读全文

posted @ 2017-03-11 08:57 HelloWorld!--By-MJY 阅读(131) 评论(0) 推荐(0) 编辑

导航