像数据结构这样的东西,我觉得通过一定量题目的练习与思考,就还是比较容易掌握。于是,我的线段树之路开始了。
题目
http://zuojie.3322.org:88/soj/problem.action?id=3019 Count Color
思路:线段树基本操作练习,属于更新区间入门题
题解:http://blog.csdn.net/lillianxiong/article/details/6769847
http://zuojie.3322.org:88/soj/problem.action?id=3010 kth number
思路:用线段树存下归并排序的过程。再二分答案
题解:http://blog.csdn.net/lillianxiong/article/details/6773108
题目:http://zuojie.3322.org:88/soj/problem.action?id=2870
思路:用线段树来修改被覆盖区间的高度。离散化建筑物的大值坐标
题解:http://blog.csdn.net/lillianxiong/article/details/6786308
题目:HDOJ-4027 Can you answer these queries?
思路:用线段树来维护区间动态和,每次直接更新到叶节点
题解:http://blog.csdn.net/lillianxiong/article/details/6790176
思路:修改一个字串的点,统计一个区间内非连续两个相同字串的长度。更新点,每次询问在根节点处询问即可。
题解:
题目:Another LCIS
题解:http://blog.csdn.net/lillianxiong/article/details/6934002