I am trying to figure out why its giving TLE in testcase 9 from the day contest ends. It was TLE that time also. After contest ended I have looked at other's solutions as well to editorials. My solution is using same binary search approach. Can anyone tells whats wrong in code why its giving TLE in testcase 9. Solution link. http://codeforces.net/contest/738/submission/22360223
Thanks in Advance. gandu007
Your solution is right)
http://codeforces.net/contest/738/submission/22402437
I only added ios_base and it got 'Accepted' :DDDD
Oh fuck man. seriously..! That little ios_base cost me 1500 points. Thanks. by the way. Can you please tell me why is that so important. ios_base, what it actually do. ?
It makes your input/output more faster. It is really important to use it when you read big data. For example, when number of elements in your array reaches 2e5)
Thanks. I found a very useful blog entry. for future reference. http://codeforces.net/blog/entry/6251