![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_树状数组
kewlgrl
好大一只咸鱼哇
展开
-
POJ 3321-Apple Tree(树状数组)
Apple Tree Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 23729 Accepted: 7132 Description There is an apple tree outside of kaka's house. Every autumn, a原创 2016-04-09 14:10:02 · 686 阅读 · 0 评论 -
HDU 1556-Color the ball(树状数组-区间修改 单点查询)
Color the ball Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 15491 Accepted Submission(s): 7731 Problem Description N个气球排成一排,从左到右依原创 2016-05-06 14:00:51 · 917 阅读 · 0 评论 -
POJ 1195-Mobile phones(二维树状数组-区间更新区间查询)
Mobile phones Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 17661 Accepted: 8173 Description Suppose that the fourth generation mobile phone base station原创 2016-05-06 15:50:33 · 1158 阅读 · 0 评论 -
树状数组
树状数组:用线性数据结构的方法解决动态统计子树权和的问题。 类似于线段树,将区间分成小段,方便计算权和。 举个栗子,将a数组构造成树状数组c。 如果a数组中共有8个元素a[1]~a[8],注意这里数组的下标要从1开始,那么: c[1]=a[1] c[2]=a[1]+a[2] c[3]=a[3] c[4]=a[1]+a[2]+a[3]+a[4] c[5]=a[5]原创 2016-04-09 14:28:33 · 411 阅读 · 0 评论 -
POJ 2299-Ultra-QuickSort(树状数组求逆序数)
Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 52967 Accepted: 19434 Description In this problem, you have to analyze a particular sorting原创 2016-05-07 10:44:46 · 1440 阅读 · 3 评论 -
POJ 3928-Ping pong(树状数组+加/乘法原理)
Ping pong Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2982 Accepted: 1103 Description N(3<=N<=20000) ping pong players live along a west-east street(原创 2016-08-08 12:14:10 · 781 阅读 · 0 评论 -
POJ 2352-Stars(树状数组-星系)
Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 46418 Accepted: 20020 Description Astronomers often examine star maps where stars are represented by原创 2017-04-15 13:39:41 · 463 阅读 · 0 评论 -
POJ 2155-Matrix(二维树状数组-区间修改 单点查询)
Matrix Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 27355 Accepted: 10003 Description Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] m原创 2017-05-04 18:19:22 · 652 阅读 · 0 评论 -
POJ 3067-Japan(树状数组-逆序数)
Japan Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 27557 Accepted: 7455 Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads原创 2017-05-04 18:23:14 · 628 阅读 · 0 评论