摘要: The story happened long long ago. One day, Cao Cao made a special order called "Chicken Rib" to his army. No one got his point and all became very pan 阅读全文
posted @ 2017-08-29 22:44 楼主好菜啊 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 一维前缀和 : 这个优化 , 可以在 O (1) 的时间内计算出一个序列的和 , 二维前缀和 : 对于一个矩阵 , 也可以在 O (1) 的时间内计算出矩阵 (x1~x2)( y1 ~ y2 ) 的和 。 sum[ i ] [ j ] 表示矩阵 1 ~ i , 1 ~ j 的和 , 那么由容斥原理知 阅读全文
posted @ 2017-08-29 10:09 楼主好菜啊 阅读(1881) 评论(0) 推荐(0) 编辑