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 1603. Erudite

hint
Posted by Anton 21 Feb 2012 09:24
Do not rape your brain with this problem:), since constraints are really small, - just run straight dynamic, it's look similar to dfs.
After I've corrected some stupid mistakes I've got AC 0.375 124 КБ, without any optimization