![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
RMQ
Joefery
生命不息,战斗不止。
展开
-
RMQ模版
/* 类型:RMQ模板 分析:用于求取区间最小值和最大值,修改值比较麻烦, O(nlogn)时间内进行预处理,O(1)时间内回答每个查询.*/#include#include#include#include#includeusing namespace std;typedef long long ll;int a[100005];int Mi原创 2016-09-05 00:44:16 · 402 阅读 · 0 评论 -
CSU 1809 Parenthesis 【前缀和+RMQ】
DescriptionBobo has a balanced parenthesis sequence P=p 1 p 2…p n of length n and q questions.The i-th question is whether P remains balanced after p ai and p bi swapped. Note that questions原创 2016-09-05 00:25:11 · 702 阅读 · 0 评论