2013年5月14日

UVa 11992 - Fast Matrix Operations 成段更新,求最值与和

摘要: Problem FFast Matrix OperationsThere is a matrix containing at most 106elements divided into r rows and c columns. Each element has a location (x,y) where 10)2 x1 y1 x2 y2 vSet each element (x,y) in submatrix (x1,y1,x2,y2) to v3 x1 y1 x2 y2Output the summation, min value and max value of submatrix ( 阅读全文

posted @ 2013-05-14 18:26 电子幼体 阅读(150) 评论(0) 推荐(0) 编辑

UVa 12299 - RMQ with Shifts 线段树 单点更新

摘要: RMQ with ShiftsIn the traditional RMQ (Range Minimum Query) problem, we have a static arrayA. Then for each query(L,R)(LR), we report the minimum value amongA[L],A[L+ 1], ...,A[R]. Note that the indices start from 1, i.e. the left-most element isA[1].In this problem, the arrayAis no longer static: w 阅读全文

posted @ 2013-05-14 15:32 电子幼体 阅读(172) 评论(0) 推荐(0) 编辑

导航