Company: intuit_24oct
Difficulty: medium
Mind Game Problem Description Alex and Adam have a set of N integers, so they decided to play a game called "Mind-Game". The two players take turns playing, Alex being the first to move. The moves of the game are as follows: When it is Alex's turn, Alex chooses any non-empty subset of numbers and removes them from the set. When it is Adam's turn, Adam chooses exactly one number and removes it from the set. The game ends when there are no numbers left in the set. Alex's goal is to maximize the sum of their chosen numbers; while Adam just tries to minimize Alex's sum by removing a number in Adam's turn. Consider both of them play optimally, you should compute the outcome of the game. Input The first line of input contains a single integer N, representing the size of the set. The second line of input contains N space-separated values, representing the values in the set. Output The output should contain a single number representing Alex's sum at the end of the game if they both play optima