HBC24156小梁的背包,背包问题,动态规划[USACO 2015 Jan G]Cow Rectangles题解

一点都不欢乐 算法基础篇 58 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
The locations of Farmer John's N cows (1

The locations of Farmer John's N cows (1 <= N <= 500) are described by distinct points in the 2D plane. The cows belong to two different breeds: Holsteins and Guernseys. Farmer John wants to build a rectangular fence with sides parallel to the coordinate axes enclosing only Holsteins, with no Guernseys (a cow counts as enclosed even if it is on the boundary of the fence). Among all such fences, Farmer John wants to build a fence enclosing the maximum number of Holsteins. And among all these fences, Farmer John wants to build a fence of minimum possible area. Please determine this area. A fence of zero width or height is allowable.

HBC24156小梁的背包,背包问题,动态规划[USACO 2015 Jan G]Cow Rectangles题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: HBC24156小梁的背包 背包问题 动态规划[USACO 2015 Jan G]Cow Rectangles题解