I have seen this a lot of time that whenever the size of the program is increased, time of the program is reduced.
For example, I made a program and submitted 3 different programs with a difference of single line i.e an array declaration of different size and time is reduced. It is good to note that TLE part can never be avoided by this thing.
- No array declaration link text (time 0.39)
- array of size 10000000 link text (time 0.36)
- array of size 100000000 link text (time 0.35)