Waterfront
시간 제한2초메모리 제한1024 MB
M일 동안 매일 자란 뒤 하루 최대 k번, 한 번에 x센티미터씩 자를 수 있을 때 가장 높은 나무의 최소 높이를 구한다.
문제
On the waterfront of the Prahova River, the Mayor of Ploieşti planted a row of ornamental tree shrubs of various varieties, each tree shrub initially having the height , . Depending on the soil in which it is planted and the weather, the shrub grows daily with height .
Every day the town hall gardener adjusts the height of the tree shrubs by cutting them with scissors. However, the gardener is limited by the quality of the scissors. Thus, with one cut they can cut off exactly centimeters from the height of a shrub tree if the height is at least centimeters (note that the tree shrub may reach height after a cut). In order not to get tired, the gardener can perform at most cuts in a day. The gardener can make several cuts on the same tree shrub in one day.
The mayor organizes an artistic event after days and wants to know what is the minimum possible height of the tallest tree shrub after the days.
Note! Every day, the trees grow first, and then the cuts are done.
입력
The first line contains , , and . Of the following lines, the th contains and , separated by a single space.
출력
Output a non-negative integer, representing the minimum height of the tallest tree shrub, after the days.
제한
힌트
The gardener cuts the trees in days, making cuts every day. At each cut they can remove centimeters from the height of one tree. The following table summarises the optimal way to make the cuts.