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?

Because he is Gennady :heart:

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