Kuber's blog

By Kuber, history, 18 months ago, In English

https://codeforces.com/contest/1734/submission/173209974

Hi

Please refer to the above submission. I gather it is O(n) solution but I'm getting TLE. When I put print command inside the recursive function, it grows linearly with n.

Can anyone help me understand why I'm getting TLE?

  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
18 months ago, # |
  Vote: I like it +3 Vote: I do not like it
try this tc