Lee Master Codeforces go buy gift friend he buy n integer time distribute friend rationallyLee n integer a_1 a_2 ldot a_n backpack k friend Lee like distribute integer backpack friend ith friend exactly w_i integer integer hand exactly friendlet define happiness friend sum maximum minimum integer hell getlee like friend happy possible word he d like maximize sum friend happiness now ask calculate maximum sum friend happiness