![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
树状数组
霍雨浩——舞麟
这个作者很懒,什么都没留下…
展开
-
hdu1541 树状数组
题目:https://vjudge.net/problem/HDU-1541 大概意思为:每个星星都有一个等级,它的等级是它的左下那一部分星星个数 数据是按y为第一关键字进行排序,x为第二关键字进行排序。 由于是按y为第一关键字进行排序,前面的都在它的左面或下面,只需考虑在它前面有多少小于或等于x的,用树状数组做 防坑指南: 树状数组里面的下标是从1开始的 ...原创 2020-02-29 17:56:14 · 130 阅读 · 0 评论 -
poj2299 树状数组求逆序对 模板题
Ultra-QuickSort POJ - 2299 题目:https://vjudge.net/problem/POJ-2299 #include<stdio.h> #include<iostream> #include<algorithm> #include<string.h> #include<math.h> #include<...原创 2020-02-29 13:21:59 · 124 阅读 · 0 评论