http://poj.org/problem?id=1655
Balancing Act
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 9072
Accepted: 3765
Description
Consider a tree T with ...
分类:
其他好文 时间:
2014-10-10 00:44:03
阅读次数:
361
题意:三种操作 ①修改第i条边的权值为val,②把u到v路径上的所有边的权值 去相反数③求u 到v路径上最大的边权线段树的区间更新还是不熟练,,一直搞不对调试了好久还是没对,最后还是看的kuangbin的代码。 1 #include 2 #include 3 #include 4 #i...
分类:
其他好文 时间:
2014-10-09 23:23:18
阅读次数:
297
今天在操作 innobackupex 的时候,执行 change master to 的时候发现 xtrabackup_binlog_pos_innodb xtrabackup_binlog_info 两个文件对应的master 的 binary log 位置不一致:less xtrabackup....
分类:
数据库 时间:
2014-10-09 22:51:47
阅读次数:
201
a(i):以节点i作为终点的单边最大路径和
b(i):以节点i作为终点的双边边最大路径和
a(i) = max{ i->val,
i->val + max{a(i->left), a(i->right) }};
b(i) = max{ i->val, i->val + max{a(i->left), a(i->right) } ,
i->val + a(i->left) + a(...
分类:
其他好文 时间:
2014-10-09 22:49:47
阅读次数:
141
1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 struct tree 8 { 9 int count;10 tree *next[26];11 };12 tree *head;13 14 voi...
分类:
其他好文 时间:
2014-10-09 22:30:07
阅读次数:
224
类图
/**
* 树 整体
*
* @author stone
*
*/
public class Tree {
private TreeNode root; //根节点
public Tree(String name) {
this.root = new TreeNode(name);
}
public TreeNode getRoot() {
re...
分类:
编程语言 时间:
2014-10-09 21:08:25
阅读次数:
213
题目大意:给定一个n个点m条边的无向连通图,k次询问两点之间所有路径中最长边的最小值
LCT的裸题!首先维护一个动态的最小生成树,然后每次加入边时删除两点间路径上权值最大的边!最后询问时直接求x到y链上的最大权值即可!水爆了!!
。。。好吧开玩笑的 真正的题解见http://blog.csdn.net/popoqqq/article/details/39755703
我只是闲得无聊水一发LC...
分类:
Web程序 时间:
2014-10-09 16:48:58
阅读次数:
262
[leetcode]Given a binary tree, find the maximum path sum....
分类:
其他好文 时间:
2014-10-09 16:29:28
阅读次数:
161
[leetcode]Given a binary tree, determine if it is height-balanced....
分类:
其他好文 时间:
2014-10-09 16:25:48
阅读次数:
132
[leetcode]Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center)....
分类:
其他好文 时间:
2014-10-09 15:33:58
阅读次数:
193