Company: Flipkart_13july
Difficulty: medium
Minimum Sum of Visible Cells Problem Description Daniel has an old square table in his house which is of size N × N, and each of its cells consists of a non-negative integer printed on it as a design. Daniel is not happy with the design of the table because the printed numbers are too large, so he decided to arrange K wooden slabs on top of the table to cover some of the cells. He wants to arrange the wooden slabs by following the rules listed below: Each wooden slab covers two cells of the table that are adjacent in a row or a column. The wooden slabs can touch each other but do not overlap. The sum of all visible (uncovered) cells needs to be as small as possible. Write a program to help Daniel determine the lowest sum of the visible cells possible. Consider that it will always be possible to place all the K slabs on the table without overlapping. Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to t