#P1843. 奶牛晒衣服
奶牛晒衣服
Description
In natural conditions, one second of sun-drying reduces a garment’s humidity by units. The stingy Aunt Xiong only bought one dryer. Using the dryer for one second additionally dries units of humidity for a single garment (i.e., in one second it can dry humidity), but at the same time only one garment can be machine-dried. There are garments, and the humidity of the -th garment is (guaranteed to be pairwise distinct). Find the minimum time needed to dry all garments (a garment is considered dry when its humidity is ).
Input Format
The first line contains three integers .
The next lines: on the -th of these lines, input .
Output Format
Output one line: the minimum time to dry all garments.
3 2 1
1
2
3
1
Hint
Sample Explanation
Dry the third garment with the machine to finish in one second.
Constraints
.
Translated by ChatGPT 5
京公网安备 11011102002149号