
数据结构----树状数组
jiangX1994
ACM菜鸟一只,但我要笨鸟先飞!!
展开
-
树状数组(数据结构)
1 一维树状数组 1 什么是树状数组 树状数组是一个查询和修改复杂度都为log(n)的数据结构,假设数组A[1..n],那么查询A[1]+...+A[n]的时,间是log级别的,而且是一个在线的数据结构。 2 树状数组作用 我们经常会遇到动态连续和查询问题,给定n个元素A[1~N],让我们求sum[L,R] = A[L]+...+A[R],或转载 2014-08-05 15:49:23 · 576 阅读 · 0 评论 -
poj 1195--Mobile phones
Mobile phonesTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 14673 Accepted: 6825DescriptionSuppose that the fourth generation mobile phone base station原创 2014-08-06 20:45:52 · 445 阅读 · 0 评论 -
poj 3321 Apple Tree
Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 18831 Accepted: 5711DescriptionThere is an apple tree outside of kaka's house. Every autumn, a原创 2014-08-06 16:08:22 · 657 阅读 · 0 评论