SP25236 DEFKIN2 - Defense of a kingdom 2

Description

**This is an extension to the problem DEFKIN http://www.spoj.com/problems/DEFKIN/ and solve it first before doing this.** Theodore implements a new strategy game “Defense of a Kingdom”. On each level a player defends the Kingdom that is represented by a rectangular grid of cells. The player builds crossbow towers in some cells of the grid. The tower defends all the cells in the same row and the same column. No two towers share a row or a column. Now the king inputs width(w),height(h),number of towers(n). Here n

Input Format

N/A

Output Format

For each test case, output a single integer number- the minimum penalty Output answer for each test case in a new line