NC50898三角尼姆,数学,博弈论Second Large Rectangle题解

季陌殇 数据结构基础 68 0
全网最全C++题库,助您快速提升编程技能!题库丰富多样,涵盖各个领域,让您在练习中不断成长!

Given a N times M N×M binary matrix. Please output the size of second large rectangle containing all texttt{"1"} "1". Containing all  texttt{"1"} "1" means that the entries of the rectangle are all  texttt{"1"} "1". A rectangle can be defined as four integers  x_1, y_1, x_2, y_2 x 1 ​ ,y 1 ​ ,x 2 ​ ,y 2 ​ where 1 leq x_1 leq x_2 leq N 1≤x 1 ​ ≤x 2 ​ ≤N and 1 leq y_1 leq y_2 leq M 1≤y 1 ​ ≤y 2 ​ ≤M. Then, the rectangle is composed of all the cell (x, y) where x_1 leq x leq x_2 x 1 ​ ≤x≤x 2 ​ and y_1 leq y leq y2 y 1 ​ ≤y≤y2. If all of the cell in the rectangle is texttt{"1"} "1", this is a valid rectangle. Please find out the size of the second largest rectangle, two rectangles are different if exists a cell belonged to one of them but not belonged to the other.

不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: NC50898三角尼姆 数学 博弈论Second Large Rectangle题解

上一篇当前分类已是最后一篇

下一篇HBC252417字符转ASCII码少女曾见的日本原风景题解