
树状数组(一维+二维)
文章平均质量分 82
处变不惊
这个作者很懒,什么都没留下…
展开
-
树状数组理解
虽然说是自己的理解,那也是看懂了别人的博客才弄懂的这些东西,其实以前的分组有线段树,这个完全可以代替树状数组(自认为),但是树状数组的这个东西感觉很巧妙,利用lowbit实现了一系列的时间优化,空间优化,下面就弄一下它的代码,原理吗,我感觉自己说不好,但是我会扒图,扒高手的总结经验。转载自http://blog.youkuaiyun.com/z309241990/article/details/96152转载 2016-08-22 23:33:02 · 239 阅读 · 0 评论 -
poj 1195 Mobile phones
DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix with the rows an原创 2016-08-22 23:41:32 · 83 阅读 · 0 评论 -
poj 2299 Ultra-QuickSort
DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seque原创 2017-05-03 17:12:22 · 336 阅读 · 0 评论 -
POJ 3264 Balanced Lineup
DescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows.原创 2016-06-03 14:55:06 · 280 阅读 · 0 评论