Comments
On Invincible_2802MLE in Code, 4 years ago
+1

You have ans.push_back(lst) in each iteration of the loop. If the loop never ends, it is quite possible to get MLE before TLE.