|  | 
|  | 
| вернуться в форум | Help pls Послано Madhav  15 июл 2008 08:51Can any one tell me how to solve this problem using greedy approach pls..?Re: Help pls Initially values till max=0 are reachable. If next coin is higher than max+1, then the answer is max+1. Otherwise max is boosted by its value (that is, values 0...max+ai are reachable). Proceed until you find a hole or you run out of coins. | 
 | 
|