Time limit exceeded

Revision en3, by Selim_Senpai, 2021-04-08 00:45:32

hello, my friends, I'm solving a DP problem on Cses and I got a time limit exceeded but I saw a solution for the problem using bottom-up technique but I got a time limit on top-down technique although we use the same approach

can someone explain why I get TLE ?

my code https://ideone.com/inIGo6

bottom-up solution https://ideone.com/Pp0EA5

Problem link https://cses.fi/problemset/task/1636

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Selim_Senpai 2021-04-08 00:45:32 53 Tiny change: 'm/Pp0EA5\n' -> 'm/Pp0EA5\n\nProblem link \nhttps://cses.fi/problemset/task/1636'
en2 English Selim_Senpai 2021-04-07 22:19:42 5 Tiny change: 'm/inIGo6\nbottom-up solution https://' -> 'm/inIGo6\n\nbottom-up solution\n https://'
en1 English Selim_Senpai 2021-04-07 21:51:43 372 Initial revision (published)