BEX-Time Limit Exceed

guys, can you help me with this solution? it gives TLE, though I think I made it according to editorial :slight_smile:
http://www.codechef.com/viewsolution/1631143

solved the problem, just changed CIN with SCANF and COUT with PRINTF, also string with char[] :|||

1 Like

It’s very common problem here. cin & cout are too slow. I think you don’t need to use char[] instead of string, on the other hand it’s a question if you really need to use string class…

I was trying out this problem:

I dont understand why I am getting Runtime error.
I had the same approach as in the editorial.
http://www.codechef.com/viewsolution/1855440

Please can anyone provide me some testcase which is causing SIGSEV??

Thanks