摘要: 题意 description You are given an array a1,a2,...,an(∀i∈[1,n],1≤ai≤n). Initially, each element of the array is unique . Moreover, there are m instructio 阅读全文
posted @ 2019-08-28 10:07 阳离子 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 数据离散化 有一些题中,题目给的数据很大,但是数据的大小本身对我们的题目没有影响,这时候,我们可以将数据 离散化 。 使用lower_bound()进行数据离散化 include include include int const maxn = 100000; using namespace std 阅读全文
posted @ 2019-08-28 08:59 阳离子 阅读(161) 评论(1) 推荐(0) 编辑
摘要: ``` include include include int const maxn = 200010; using namespace std; int a[maxn], b[maxn]; //第几个版本的根节点编号 int root[maxn 1; build(lc[rt], l, mid); 阅读全文
posted @ 2019-08-28 08:53 阳离子 阅读(111) 评论(0) 推荐(0) 编辑