Lambda Functions lead to TLE!
Difference between en1 and en2, changed 11 character(s)
The only difference between the two submissions is using a lambda function vs a global function.↵
Lambda functions made the runtime around 7 times slower.↵

What do you think this is because?↵

AC: [submission:255501228]↵

TLE: 
[submission:255500672]↵

so should we always prefer global functions over lambdas then?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Seferovic 2024-04-07 18:10:59 11
en1 English Seferovic 2024-04-07 18:06:26 337 Initial revision (published)