写的不错,里面还有分了类的习题,不错 http://blog.csdn.net/metalseed/article/details/8039326
好吧,其实我是想告诉广大新手线段树很爱出错的一个点!
http://www.cnblogs.com/liwenchi/p/5761257.html