树状数组
console.log( )
这个作者很懒,什么都没留下…
展开
-
HDU1166:敌兵布阵(树状数组)
Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视原创 2016-08-16 22:05:14 · 533 阅读 · 0 评论 -
HDU1394:Minimum Inversion Number
Description The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj. For a given sequence of numbers a1, a2, ..., an, if we move the f原创 2016-08-18 21:44:08 · 401 阅读 · 0 评论 -
poj2299:Ultra-QuickSort(树状数组+离散化)
Description In 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 seq原创 2016-08-18 20:32:26 · 391 阅读 · 0 评论