Now he decided to build a new house and he is now choosing a location where he wanted to build it. Assume the whole area be of rectangular field of size NxM. The mayor did not let Jonathan's build the house on the places where the lightening strike. The mayor said that some of the cells of the field are dangerous for the foundation. There are exactly K such cells. The house will occupy a rectangular area in this stripe with sides parallel to the sides of the original site. Your task is to help Jonathan for finding each Li, Hi (the lowest and the highest boundaries). Develop a simple C code in not more than 50 lines that finds the maximum area of the house that Jonathan can build on the relevant site. Test Case Output 455 7 21
Now he decided to build a new house and he is now choosing a location where he wanted to build it. Assume the whole area be of rectangular field of size NxM. The mayor did not let Jonathan's build the house on the places where the lightening strike. The mayor said that some of the cells of the field are dangerous for the foundation. There are exactly K such cells. The house will occupy a rectangular area in this stripe with sides parallel to the sides of the original site. Your task is to help Jonathan for finding each Li, Hi (the lowest and the highest boundaries). Develop a simple C code in not more than 50 lines that finds the maximum area of the house that Jonathan can build on the relevant site. Test Case Output 455 7 21
Step by step
Solved in 2 steps with 1 images