RMQ
文章平均质量分 79
AC_Gibson
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU3183 A Magic Lamp
#include #include using namespace std; char num[1005],ans[1005]; int f[1005][1005]; int min(int a,int b) { return num[a] } void init_RMQ(int len) { int i,k; for(i=0;i原创 2014-09-22 17:44:47 · 595 阅读 · 0 评论 -
HDU3486 Interviewe
ST算法 #include #include #include #define MAXN 200005 using namespace std; int f[MAXN][20]; int n,num[MAXN]; int MAX(int a,int b) { return a>b?a:b; } void init_RMQ() {原创 2014-09-23 12:35:48 · 825 阅读 · 0 评论 -
HDU2888 Check Corners
二维RMQ问题 题意是输入一个矩阵,然后原创 2014-09-25 10:08:59 · 642 阅读 · 0 评论 -
POJ2019 Cornfields 二维RMQ问题
二维RMQ问题 题意是输入原创 2014-09-25 11:44:17 · 621 阅读 · 0 评论 -
ZOJ2859 Matrix Searching 二维RMQ问题
二维RMQ问题。 #include #include #include #include using namespace std; int f[302][302][9][9]; int num[302][302]; int n; void init_RMQ() { int i,j,r,c; for(i=1;i<=n;i++) for(j=1;j<=n;j+原创 2014-09-26 13:46:47 · 618 阅读 · 0 评论 -
POJ3264 Balanced Lineup 线段树||RMQ
题目链接:http://poj.org/problem?id=3264 题目大意:给出一个序列,Q次查询,每次查询找出该区间内最大值和最小值的差。 分析:线段树和RMQ都可以。 线段树实现代码如下(2412K,2188MS): #include #include #include using namespace std; const int maxn=5000原创 2015-08-24 09:45:21 · 501 阅读 · 0 评论
分享