This code is showing Time Limit Error at Codechef
Showing Time Limit Error
Hi @aryangrover I see you are using the brute force approach, since there’s a large amount of inputs it will give TLE. Please try the question using the pigeonhole principle method explained in the video.
Ok Thanks, Mam.
Mam, I have one more doubt. I first learned C++ and then did DS Algo from Udemy and had no practice in that and some concepts are also very less clear. I thought I should buy the course of Competitive Programming but I think that was my worst decision ever. Please help me asap What should I do? I completed STL and learned STL from other sources too but I am very poor in building logic, and I am facing a lot of problems in the Mathematics Section. Please help me with that Mam.
Waiting for Your Reply.
HI @aryangrover the competitive coding course is a bit advanced, so I would suggest clearing your basics like data structures and some basic algorithms first and solve some easy problems for logic building. There are many problems available on our platform hackerblocks and you can practice from other websites as well. Once you clear your basics then you’ll be able to learn advanced techniques more easily.
Thanks Mam
Mam I was thinking of buying course of Algo++ so as to clear basics too and practice too and put this course on hold. Will this be good.
@aryangrover you can check out the learning tracks on our website. https://online.codingblocks.com/app/tracks/c-plus-plus-data-structures-algorithms
https://online.codingblocks.com/app/tracks/competitive-programming
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.