
rmq
A_Comme_Amour
胜利油田第一机房
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【模板】RMQ_ST表
rmq:用来查询区间最值问题 ST(稀疏表):它可以做到O(nlogn)的预处理 O(1)地回答每个询问。 总的时间复杂度O(nlogn+Q) 倍增的思想:f[i][j]表示下标为i的数向上数2^j个数中的最值。#include<cstdio> #include<cmath> #include<algorithm> using namespace std; int n,a[100001],f[1原创 2017-11-04 21:55:34 · 364 阅读 · 0 评论 -
【poj3368 】Frequent values
Frequent values Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 20472 Accepted: 7245 DescriptionYou are given a sequence of n integers a1 , a2 , … , an in non-decreasing order原创 2017-11-05 00:11:21 · 456 阅读 · 0 评论