题目链接:poj 3237 Tree
题目大意:给定一棵树,三种操作:
CHANGE i v:将i节点权值变为vNEGATE a b:将ab路径上所有节点的权值变为相反数QUERY a b:查询ab路径上节点权值的最大值。
解题思路:树链剖分,然后用线段树维护节点权值,成端更新查询。
#include
#include
#include
using namespace ...
分类:
其他好文 时间:
2014-10-17 10:18:39
阅读次数:
190
添加到目录: 结构如上:假设红色部分是未来元素$(".dir-li #dir-ctrl-dv").on('change','.dir-ctrl',function () { #....code ...
分类:
Web程序 时间:
2014-10-17 01:44:53
阅读次数:
307
# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# *** DO NOT EDIT THIS FIL...
分类:
数据库 时间:
2014-10-16 17:55:42
阅读次数:
255
1:删除列 ALTER TABLE 【表名字】 DROP 【列名称】 2:增加列 ALTER TABLE 【表名字】 ADD 【列名称】 INT NOT NULL? COMMENT ‘注释说明‘ 3:修改列的类型信息 ALTER TABLE 【表名字】 CHANGE 【列名称】【新列...
分类:
数据库 时间:
2014-10-16 15:49:22
阅读次数:
187
Method 1:
> grub --> recovery mode --> e
> ro single rw single init=/bin/bash
> ctrl + x
> chmod 0440 /etc/sudoers
Method 2:
> pkexec chmod 0440 /etc/sudoers...
分类:
其他好文 时间:
2014-10-15 14:43:20
阅读次数:
199
1. Attached Property bound to task state. Any change will dynamically set data template.2. Visual State ManagerADataTemplateSelectordoes not respond t...
分类:
其他好文 时间:
2014-10-15 11:29:00
阅读次数:
260
To change path URL with AngularJS, $location.path() is passed the new URL as a parameter, and the page is automatically reloaded. This means that if y...
分类:
Web程序 时间:
2014-10-13 17:49:19
阅读次数:
172
2015年是移动支付的大年:苹果、Twitter和Facebook等巨头都开始进军这个市场,再加上PayPal、Coin和Square几个“老玩家”的存在,使得今年的移动支付市场热闹非凡。但是,大多数商店可能还需要数年时间才能停止对信用卡的依赖。那么,移动支付和传统支付的鸿沟如何填补呢?现在一家初创...
分类:
其他好文 时间:
2014-10-13 17:40:29
阅读次数:
223
??
grant replication slave on *.* to
'rep'@'172.17.1.%' identified by '12QAZXCvfr34';
change master to master_host='172.17.1.150',master_user='rep',master_password='12QAZXCvfr34',master_log_file='...
分类:
数据库 时间:
2014-10-13 15:02:39
阅读次数:
294
1.更改IPV4
Linux
IPV4 ifconfig eth0 192.168.24.1 netmask 255.255.255.0
# /sbin/ifconfig inet6 add /
IPV6 ifconfig eth0 inet6 add 2001:0db8:0:f101::1/64
做个小记
10/13 2014...
分类:
其他好文 时间:
2014-10-13 14:27:29
阅读次数:
255