836

This problem also can be solved using Dynamic Programming.

Similar problems are : uva 108, uva 10074,uva 10667; These can be solved using the same algorithm.

Leave a Reply

Your email address will not be published. Required fields are marked *