n, so he has to do a lot of homework.i-th course, Colin must write an essay with no less than. words. And Colin can write one word per second.However, Colin wants to finish homework as fast as possible, so he decides to reuse his homework. For the
Colin has
n
n optional courses numbered from
1
1 to
n
n, so he has to do a lot of homework.
For the
i
i-th course, Colin must write an essay with no less than
a_i
a
i
words. And Colin can write one word per second.
However, Colin wants to finish homework as fast as possible, so he decides to reuse his homework. For the
i
i-th course homework, he can write
a_i
a
i
words directly, or spend
c_i(c_i< a_i)
c
i
(c
i