311G
ABC311G One More Grid Task 题解
给出 \(n\times m\) 的矩阵 \(a\)。求权值最大子矩形的权值。 一个矩形的权值定义为它里面全部数的和乘上最小值。 \(n,m\leq 300,0\leq a_{i,j}\leq 300\)。 枚举最小的数 \(a_{i,j}\)。则在满足 \(a_{i,j}\) 是最小值时,包含 \ ......
[ABC311G] One More Grid Task
Problem StatementThere is an $N \times M$ grid, where the square at the $i$-th row from the top and $j$-th column from the left has a non-negative int ......
[ABC311G] One More Grid Task
# [ABC311G] One More Grid Task ## 题意 给一个矩阵,定义一个矩阵的价值为其最小值乘上总和,问子矩阵中最大价值。 ## 题解 感觉有些简单,不配在G这个位置。 观察贡献的形式,我们需要维护最小值与还有和。 首先第一个想法是以最小值为分治点来分治,划分区域。 但是对比一 ......