摘要: 转自:http://blog.csdn.net/jtjy568805874/article/details/51480479 #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> using nam 阅读全文
posted @ 2016-05-24 23:08 shuguangzw 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 分析:一棵以1为根的有根树,然后每个点维护从根到当前节点的路径和,当修改一个点时 只会影响的子树的和,最优值也是子树最大的值 #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> using nam 阅读全文
posted @ 2016-05-24 22:39 shuguangzw 阅读(168) 评论(0) 推荐(0) 编辑