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}\) 是最小值时,包含 \ ......
题解 311G More Grid Task

[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 ......
311G More Grid Task ABC

[ABC311G] One More Grid Task

# [ABC311G] One More Grid Task ## 题意 给一个矩阵,定义一个矩阵的价值为其最小值乘上总和,问子矩阵中最大价值。 ## 题解 感觉有些简单,不配在G这个位置。 观察贡献的形式,我们需要维护最小值与还有和。 首先第一个想法是以最小值为分治点来分治,划分区域。 但是对比一 ......
311G More Grid Task ABC

Atcoder ABC311G One More Grid Task

可以想到枚举最小值同时算出包含其的最大矩阵和。 考虑枚举行的上下界,再枚举最小值然后求出最大的列的范围,因为 $a_{i, j}\ge 1$ 列的范围越广矩阵和也越大。 考虑如何算出列的范围,令第 $i$ 列在选中的行的范围内的最小值为 $mn_i$,则对于 $mn_i$ 的列 的范围 $[l, r ......
Atcoder 311G More Grid Task
共4篇  :1/1页 首页上一页1下一页尾页