CF #822 Problem D recursion solution TLE

Правка en1, от Kuber, 2022-09-23 18:13:40

https://codeforces.me/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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Kuber 2022-09-23 18:13:40 330 Initial revision (published)