Question 1
There are positive integers written on a whiteboard. Here is a one-player game with these numbers: You start with a score of 0 . You will increase your score by performing the following move exactly times:
- Choose two integers and that are written on the whiteboard.
- Add to your score.
- Erase and from the whiteboard.
Note that after performing the move times, there will be no more integers written on the whiteboard. In general, our goal is to find the maximum final score you can achieve if you optimally perform the moves.
We will refer to this value as the answer.
Based on the above data answer the given subquestions.
What is the answer if the input is 1 1 2 1?
