how greedy approach worked in this problem?

Revision en1, by Vesper_Lynd, 2018-08-12 13:27:59

Source I mean how greedy approach using recursion worked in this problem. Because lets say if for a particular value more than one pegs accept that value, than choosing the first one would give the best result how it can happen i mean, if we choose the later peg than it may happen that more balls can be put into, some solutions have greedy approach accepted,Please guide over here!! Uva 10276.

Tags #recursion

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Vesper_Lynd 2018-08-12 13:29:37 47
en1 English Vesper_Lynd 2018-08-12 13:27:59 517 Initial revision (published)