luogu#P1843. 奶牛晒衣服
奶牛晒衣服
Background
Aunt Xiong (Xiong dama) decides to dress each calf in a cute baby outfit. However, since the clothes are very wet, drying them for the calves becomes an unpleasant task. So, Aunt Xiong asks you (the cow) to help her complete this important job.
Problem 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