
RMQ
junior19
abcde
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
CF689D:Friends and Subsequences(ST表 + 二分)
D. Friends and Subsequences time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Mike and !Mike are old childhoo原创 2017-05-20 12:09:52 · 472 阅读 · 0 评论 -
Disjoint Sparse Table(不相交散列表)模板
今天看到一道题,有1e6个数,2e7个询问,每个询问给出区间[l,r],对每个询问输出区间内的数之和,由于时间限制很紧,每个询问基本要O(1)回答,然后我了解到这个数据结构可以解决这类问题。 # include using namespace std; const int N = 1058576, LOGN = 22; long long v[N][LOGN]; long long a[N],原创 2017-11-26 17:20:35 · 408 阅读 · 0 评论