I just found strange thing about
sprintf() (c++ library function).
have a look at these two solutions
[Time limit Exceeded solution]
the only difference between them is that, I used
in TLE solution,
in AC solution I replaced above
You can also observe that ACed solution took only 0.01s and 2.8MB memory
but TLE solution took around 11.8MB
And one more thing program that gave TLE runs in 0s in [IDEONE] with extreme input data
so is it a bug in [CODECHEF] itself
Somebody please explain me is this a bug or some considerable unknown operation is happening here.
Thanks in advance.