摘要: Description You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries cons 阅读全文
posted @ 2018-10-17 22:42 真想不出名字了 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Problem Description Paul draw a big m*n matrix A last month, whose entries Ai,j are all integer numbers ( 1 <= i <= m, 1 <= j <= n ). Now he selects s 阅读全文
posted @ 2018-10-17 21:39 真想不出名字了 阅读(257) 评论(0) 推荐(0) 编辑
摘要: (1) n是指要找该数列的第n项。 (2) 往vec中放入该数列前几项的值,越多越精确。 阅读全文
posted @ 2018-10-17 12:28 真想不出名字了 阅读(324) 评论(0) 推荐(0) 编辑
摘要: ①一维RMQ (1) dp[i,j] 表示从第i个数起连续2j个数中的(最大值min、最小值max、最大公约数gcd……),通过更改下列代码中的红色函数即可实现。 (2) b数组放置所需查询的数列。 ②二维RMQ 给定一个n*m矩阵,每次询问左上角(r1,c1)到右下角(r2,c2)的子矩形中的(最 阅读全文
posted @ 2018-10-17 09:52 真想不出名字了 阅读(254) 评论(0) 推荐(0) 编辑