Time Limit Exceeded without recursion


#1

When I do it without recursion, always told me Time Limit Exceeded. Did someone encounter the same problem?


#2

I had the same issue. I just put an & while passing the vector to the another function and it worked.