← ALL NOTES
Array

3075. Maximize Happiness of Selected Children

Given an array happiness and a number k. You select k children one per turn; each selection decreases the happiness of all not-yet-selected children by 1 (not below 0). Maximize the total happiness…

Loading…