随笔分类 -  RMQ算法

摘要:Description For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a g 阅读全文
posted @ 2016-07-13 19:05 deadshotz 阅读(98) 评论(0) 推荐(0) 编辑
摘要:RMQ (Range Minimum/Maximum Query)算法 1. 概述 RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j<=n),返回数列A中下标在i,j之间的最小/大值。这 阅读全文
posted @ 2016-07-13 17:32 deadshotz 阅读(254) 评论(0) 推荐(0) 编辑