摘要:
Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the 阅读全文
posted @ 2019-07-29 23:34
_Ackerman
阅读(264)
评论(0)
推荐(0)
摘要:
首先,先让我们了解下逆序对的概念: 如果存在正整数 i, j 使得 1 ≤ i < j ≤ n 而且 A[i] > A[j],则 <A[i], A[j]> 这个有序对称为 A 的一个逆序对,也称作逆序数。 现在直接拿POJ-2299作为例题来说下这个逆序对吧 具体的代码实现: 阅读全文
posted @ 2019-07-29 23:29
_Ackerman
阅读(519)
评论(0)
推荐(0)
摘要:
树状数组基础 树状数组是一个查询和修改复杂度都为log(n)的数据结构。主要用于数组的单点修改&&区间求和. 另外一个拥有类似功能的是线段树. 具体区别和联系如下: 1.两者在复杂度上同级, 但是树状数组的常数明显优于线段树, 其编程复杂度也远小于线段树. 2.树状数组的作用被线段树完全涵盖, 凡是 阅读全文
posted @ 2019-07-29 16:15
_Ackerman
阅读(334)
评论(0)
推荐(0)
摘要:
Increasing Subsequence (hard version) Increasing Subsequence (hard version) The only difference between problems C1 and C2 is that all values in input 阅读全文
posted @ 2019-07-29 00:17
_Ackerman
阅读(279)
评论(0)
推荐(0)

浙公网安备 33010602011771号