
After a lots of WA I've asserted the conditions and observed that in the 8th test there are equal coins in the input, however the problem statement says that "there are N different natural numbers".
Now I've got AC.

how did u solve this task?:D

ok, here is some help: knapsack :D

well ok i know that but how to implement?
just go through all numbs until i find one that isnt correct?
imo that wont work:D

well, if there is such a number then it must be <= 2 * maximum number in input :D

hmmm just curious why must it be 2*the biggest numb?:D