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 1437. Gasoline Station

I use DFS, how to solve it by DP?
Posted by hliu20 26 May 2013 18:56
DFS, record the state, if come into a state appeared before , ignore it.
DFS is very slow, can anybody give some hints to DP?
Re: I use DFS, how to solve it by DP?
Posted by Felix_Mate 13 Jul 2015 10:21
Это и есть ДП. Ведь ты переходишь по сути в известные состояния(т.е.уже просмотренные) и новые,для которых рассматриваешь переходы.Просто у нас не совсем стандартные размерности "подзадачи".
ДП-это не только реккурентные соотношения.