You are given a rectangular cake of dimensions h $ imes$ w and two integer arrays horizontalCuts and verticalCuts where:
horizontalCuts[i] is the distance from the top of the rectangular cake to the
verticalCuts[j] is the distance from the left of the rectangular cake to the
Return the maximum area of a piece of cake after you make all the horizontal and vertical cuts.
Note: Since the answer can be large, return it modulo
.
Constraints:
h, w
horizontalCuts.length h
verticalCuts.length w
horizontalCuts[i] h
verticalCuts[i] w
All the elements in horizontalCuts are distinct.
All the elements in verticalCuts are distinct.
You are given a rectangular cake of dimensions h $ imes$ w and two integer arrays horizontalCuts and verticalCuts where:
horizontalCuts[i] is the distance from the top of the rectangular cake to the
verticalCuts[j] is the distance from the left of the rectangular cake to the
Return the maximum area of a piece of cake after you make all the horizontal and vertical cuts.
Note: Since the answer can be large, return it modulo
.
Constraints:
h, w
horizontalCuts.length h
verticalCuts.length w
horizontalCuts[i] h
verticalCuts[i] w
All the elements in horizontalCuts are distinct.
All the elements in verticalCuts are distinct.