5654: Packing Rectangles
[Creator : ]
Description
There are $n$ rectangles of the same size: $w$ in width and $h$ in length.
It is required to find a square of the smallest size into which these rectangles can be packed. Rectangles cannot be rotated.
It is required to find a square of the smallest size into which these rectangles can be packed. Rectangles cannot be rotated.
Input
The input contains three integers $w,\ h,\ n\ (1≤w,\ h,\ n≤10^9)$.
Output
Output the minimum length of a side of a square, into which the given rectangles can be packed.
Sample 1 Input
2 3 10
Sample 1 Output
9