When I am trying to solve This Question First I get TLE then I read editorial and some of my friend's solution and I like one of my friend[user:arham_doshi]'s solution and try to implement this by myself. But still I get TLE. Then I copied Arham's Accepted code and paste it in that problem then also it gives TLE. But after some time I noticed that he used language c++14 for submit code and i am using c++17. Then i change the language and submit code then i get accepted.
Code submitted in c++14 click here
Code submitted in c++17 Click here
So why this happened. I am very curious to know about this thing. Can anyone explain?



