give array num obtain subsequence array sum element strictly great sum non include element subsequence if multiple solution return subsequence minimum size exist multiple solution return subsequence maximum total sum element a subsequence array obtain erase possibly zero element array note solution give constraint guarantee unique also return answer sort nonincreasing order Example 1input num 431098output 109 Explanation the subsequence 109 108 minimal sum element strictly great sum element include however subsequence 109 maximum total sum element Example 2input num 44767Output 776 Explanation the subsequence 77 sum element equal 14 strictly great sum element include 14 4 4 6 therefore subsequence 767 minimal satisfying condition note subsequence return nondecrease order Constraints1 numslength 5001 numsi 100