![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
RMQ
SSimpLe_Y
人一我百,人十我万,然而我做不到。
展开
-
RMQ模板
#include #include #include #include using namespace std; int maxsum[1000000][30]; int minsum[1000000][30]; int a[1000000]; int main(void) { int n,i,j; while(scanf("%d",&n)==1) {原创 2016-07-18 16:05:36 · 315 阅读 · 0 评论 -
lightoj 1081 - Square Queries(二维RMQ)
Little Tommy is playing a game. The game is played on a 2D N x N grid. There is an integer in each cell of the grid. The rows and columns are numbered from 1 to N. At first the board is shown. When t原创 2016-11-05 09:56:54 · 687 阅读 · 0 评论 -
Codeforces Round #466 (Div. 2) E. Cashback (dp+树状数组+RMQ)
Since you are the best Wraith King, Nizhniy Magazin «Mir» at the centre of Vinnytsia is offering you a discount.You are given an array a of length n and an integer c.The value of some array b of lengt...原创 2018-02-24 21:09:36 · 1014 阅读 · 0 评论