
树状数组
旺旺_碎_冰冰
这个作者很懒,什么都没留下…
展开
-
敌兵布阵 HDU - 1166 (线段树入门,单点更新,区间查询)
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以...原创 2018-07-27 17:23:03 · 293 阅读 · 0 评论 -
Ultra-QuickSort POJ - 2299 (树状数组求逆序数&离散化简单)
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 sequence is sorted i...原创 2018-08-04 18:36:02 · 227 阅读 · 0 评论 -
Ping pong (树状数组)
N(3<=N<=20000) ping pong players live along a west-east street(consider the street as a line segment).Each player has a unique skill rank. To improve their skill rank, they often compete with e...原创 2018-08-04 18:43:29 · 1242 阅读 · 0 评论 -
2018年全国多校算法寒假训练营练习比赛(第五场)A:逆序数(小技巧)
链接:https://www.nowcoder.com/acm/contest/77/A来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个...原创 2018-02-27 17:46:52 · 440 阅读 · 0 评论 -
See you~ (hdu1892 二维树状数组)
Now I am leaving hust acm. In the past two and half years, I learned so many knowledge about Algorithm and Programming, and I met so many good friends. I want to say sorry to Mr, Yin, I must leave now...原创 2018-08-02 11:26:09 · 516 阅读 · 0 评论 -
Stars (树状数组)
Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and ...原创 2018-08-02 11:38:10 · 602 阅读 · 1 评论