Kuber's blog

By Kuber, history, 2 years ago, In English

https://codeforces.net/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?
»
2 years ago, # |
  Vote: I like it +3 Vote: I do not like it
try this tc