tle on DRANGE aug challange

please look on submission no.1252247 & 1252242

1252247 works well with code on line … 20,21,22,23,25,27,28,29;
but when i remove those line in submission id.1252242
it shows tle…

please give me the importance of those lines… that avoid tle…

this is setter’s solution

thank you…


Great question, I’m interested what’s the answer. It seems that tight time limits aren’t good.