SPOJ Roads — Unexpected TLE

Revision en1, by back_to_basics, 2017-12-17 21:35:00

I'm trying to solve www.spoj.com/problems/ROADS/. But getting unexpected TLE. My code is here : https://ideone.com/BpFpHQ is it due to infinite recursion?? Plz help...

Tags spoj, dp, tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English back_to_basics 2017-12-17 21:35:00 196 Initial revision (published)