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 1310. ACM Diagnostics

Give please any hints, how to solve this problem. I get TLE(16)
Posted by Tratata (barssimfi@mail.ru) 28 Jul 2004 16:14
Re: Give please any hints, how to solve this problem. I get TLE(16)
Posted by Denis Koshman 13 Aug 2008 02:54
DP on Amount x Remainder (100x50), then continusously subtract calculated amounts with 1... 2... 3... from given index. Once it becomes strictly less than current number - proceed deeper for the next value.