Company: Turing_21april
Difficulty: medium
Maximize Achievements Score Problem Description You are given an integer array achievements of length n , where achievements[i] is the value of the i-th achievement. Initially your total score x is 0 , and every achievement is marked as unclaimed. You may perform the following operation any number of times (including zero times): Select an unclaimed achievement i , where 0 <= i <= n - 1 . If achievements[i] is strictly greater than your current total score x , then add achievements[i] to x (that is, x = x + achievements[i] ) and mark achievement i as claimed. If achievements[i] is not strictly greater than x , the operation cannot be performed on i . Determine the maximum total score you can reach by choosing which achievements to claim, and in which order, optimally. Input Format (inferred - the source presents achievements as a function argument, so the exact stdin layout is not stated. The layout below is fixed for this judge.) The first line contains a single integer n , the