
数据结构_RMQ
SCUT_Pein
这个作者很懒,什么都没留下…
展开
-
区间最小值 RMQ
#include #include #include using namespace std; #define maxn 108 int n,d[maxn][maxn]; int A[maxn]; inline int min(int a,int b) { return a>b?b:a; } void RMQ_init() { for(int i = 1;i <= n;i++) d[i原创 2014-02-19 21:14:15 · 656 阅读 · 0 评论 -
UVA 11235
You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1 ≤ i ≤ j ≤ n). For each query, d原创 2014-02-19 23:27:08 · 773 阅读 · 0 评论