摘要:
在两个传送带上分别三分两个点计算 三分套三分 # include <bits/stdc++.h> # define IL inline # define RG register # define Fill(a, b) memset(a, b, sizeof(a)) # define Sqr(x) ( 阅读全文
posted @ 2017-12-19 21:46
Cyhlnj
阅读(148)
评论(0)
推荐(0)
摘要:
大于k的部分直接加k 对于小于等于k的cnt个数 ans=cnt*k - Σ(k/i * i) 然后k/i在一段区间内不变,这段区间直接可以数列求和 # include <bits/stdc++.h> # define IL inline # define RG register # define 阅读全文
posted @ 2017-12-19 20:41
Cyhlnj
阅读(129)
评论(0)
推荐(0)
摘要:
CDQ套CDQ或者CDQ套树套树 前者快于后者然而我写了后者 # include <stdio.h> # include <stdlib.h> # include <iostream> # include <algorithm> # include <string.h> # define IL in 阅读全文
posted @ 2017-12-19 19:37
Cyhlnj
阅读(235)
评论(0)
推荐(0)
摘要:
CDQ分治或树套树可以切掉 CDQ框架: 先分 计算左边对右边的贡献 再和 所以这个题可以一维排序,二维CDQ,三维树状数组统计 CDQ代码 # include <stdio.h> # include <stdlib.h> # include <iostream> # include <algori 阅读全文
posted @ 2017-12-19 19:34
Cyhlnj
阅读(223)
评论(0)
推荐(0)
摘要:
CDQ分治 把删除转变为逐个添加,于是就变成了三维偏序问题 时间,位置,大小 分两遍统计即可 # include <stdio.h> # include <stdlib.h> # include <iostream> # include <algorithm> # include <string.h 阅读全文
posted @ 2017-12-19 19:28
Cyhlnj
阅读(236)
评论(2)
推荐(0)

浙公网安备 33010602011771号