ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1353. Milliard Vasya's Function

My recursive solution passed i want to convert it to iterative. Need help
Posted by Nikhil 31 Oct 2014 21:46
Hi Can anybody help me to convert my recursive solution to iterative. Can i Post code here?
Re: My recursive solution passed i want to convert it to iterative. Need help
Posted by Timo 2 Oct 2015 22:26
If your solutions are in MAX_SUMxMAX_DIGITS matrix, then just fill the solutions row-by-row. This way it is guaranteed that at each step you have all solutions you have to sum up already computed.