在topcoder的算法区看到了很详细的介绍,转一下 http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=binaryIndexedTrees