
RMQ
文章平均质量分 66
vocaloid01
小菜鸟一只_(:з」∠)_前来膜拜各路大佬orz
展开
-
ST求区间最值模板
时间复杂度:预处理O(nlogn),查询O(1)。 const int MAXN = ; int board[MAXN];//存数据下标从1开始 int ma[MAXN][20],mi[MAXN][20];//区间最大值,区间最小值。 void ST_prework(int n){ for(int i=1 ; i<=n ; ++i)ma[i][0] = mi[i][0] = ...原创 2018-08-26 19:10:40 · 186 阅读 · 0 评论 -
HDU - 5289 Assignment (RMQ+二分)
Tom owns a company and he is the boss. There are n staffs which are numbered from 1 to n in this company, and every staff has a ability. Now, Tom is going to assign a special task to some staffs who w...原创 2018-08-26 19:04:18 · 160 阅读 · 0 评论