mark http://dongxicheng.org/structure/binary_indexed_tree/ http://blog.csdn.net/greyant/article/details/7548564