← Back to topics
Topic

bankomati

R
RobertGerbicz
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.
M
MilosRadic
how did u solve this task?:D
b
boris4
ok, here is some help: knapsack :D
M
MilosRadic
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
b
boris4
well, if there is such a number then it must be <= 2 * maximum number in input :D
M
MilosRadic
hmmm just curious why must it be 2*the biggest numb?:D