In the problem Div 2 C of the recent Codeforces round #415, I got TLE on test 69. I was unable to figure out the reason as the loop was running for just n times. So, I changed my array to arraylist, and used Collections.sort()
instead of the Arrays.sort()
. To my surprise, it passed without any other changes! What could be the reason here? Check my last 2 submissions for this : Your text to link here... and Your text to link here...