Getting TLE

This is the link of gennady’s AC solution - https://www.codechef.com/viewsolution/17472724

and this is mine TLE https://www.codechef.com/viewsolution/24535468
problem link -https://www.codechef.com/COOK91/problems/CARRAY
code is almost same. can anyone specify the reason?

1 Like

Because he is Gennady :heart:

Yeah even @karangreat234 will pass it in 0.01 secs
It depends on who you are XD

2 Likes

LOL :joy::joy::joy::joy:

1 Like

There is some error in your code, fast i/o is used for decreasing time but in your case its actually increasing it. You need not to include it multiple time.
Also you must initialize your “co” variable with value 1. This is responsible for WA verdict.

1 Like

Sir sir sir thanks for help but post wast months old and now I know reason it was because of slow i/o.

4 Likes

I have seen it in recent time, replied as soon as I found some error. Learning a lesson a month later is better than never.

2 Likes

:joy::joy: \hspace{0mm} \hspace{0mm}

1 Like

there isn’t a anyway to close the topic after getting required answer?

2 Likes

Yes you can(maybe).But it’s not required.