摘要:
链接: http://acm.hdu.edu.cn/showproblem.php?pid=3911 题意: 给出01串 1代表黑色 0代表白色 0 a b:询问[a,b]中1的连续最大长度 1 a,b:把[a,b]区间的0->1 1->0 题解: lsum1[],rsum1[],msum1[]分别 阅读全文
摘要:
链接: http://poj.org/problem?id=3667 代码: 阅读全文
摘要:
链接: http://poj.org/problem?id=3468 题解: 就是普通的线段树区间更新,区间求和 代码: 阅读全文
摘要:
链接: http://acm.hdu.edu.cn/showproblem.php?pid=1556 题解: 之前偷懒使用前缀和写的,最近要复习一下线段树,所以又用线段树写了一下 另外是时候修改一下自己的//head了 代码: 阅读全文