Need Help to avoid Wrong Answer on Spoj Problem FPOLICE

Правка en1, от hulk_baba, 2017-08-08 20:58:48

Please go through this problem FPOLICE.I wrote a recursive solution intending to somehow convert it into an iterative one. But my recursive solution gives wrong answer. I applied a simple approach explore a vertex 'idx' and calculate minimum risk and money associated with that 'idx' and 'T'(time) and if some vertex is already visited on that path mark it so I do not have to visit it again. I have written some comments too. Can anybody please help to figure out why this code gives the Wrong answer. Code link here

Теги dynamic programming, spoj

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский hulk_baba 2017-08-08 20:58:48 648 Initial revision (published)