Spending too much time on each problem?

Hello, I have been doing competitive coding for about 3 months now and am brushing up on DSA topics side by side while practicing. I think I am spending too much time per problem in div3 in the long contests.
for example, i spent about 1.5 hours on this one which is of easy category I think, Contest Page | CodeChef, i got an error initially and fixed it after spending about 120 mins on it and got AC. Am I spending too much time on this and should just stop after some specific time limit? Any tips on how to increase speed are greatly appreciated.

You’re not doing bad per se, everyone is different when it comes to the speed at which they improve. I found it’s okay to get stuck on a problem for 2-3 hours if you are trying ideas out throughout the whole time period. This way you practice solving problems and training your mental ability, even if it’s a wrong approach it’s far better than reading the editorial and blindly copying what it says and has a much greater impact on one’s self-improvement. This is no science, it’s just what I’ve learned as I practiced.

Once you’re stuck on a problem without any new ideas, say 30 minutes I’d advise moving to other problems and coming back to it the next day (I do this for OI type problems mostly) as sometimes the idea can’t be spotted so easily. It’s been scientifically proven that even when you seemingly take a rest from solving some mathematical/logical problem, your brain is heavily involved in doing it and that’s why there are so many ideas that just ‘click’ when you go to sleep, shower, eat, go to a workout, basically all the unexpected moments and places.

If you get stuck for 2 days, I’d say go read the editorial and take your time to understand it. Invest yourself fully into truly understanding what’s going on, so if it takes your whole day, it’s okay it means you’ll learn a new idea that may be handy in a few contests. This is my 2 cents, so consider this but try to adapt it to the way you function the best, everyone is different after all! :slight_smile:


I Agree with @nichke
Always try to solve those questions that are just above your comfort zone. :v:

“Today’s tears water tomorrow’s gardens.”
― Matshona Dhliwayo


thank you

This post was flagged by the community and is temporarily hidden.

The same happend with me too. I still remember I got stuck in a problem of long challenge for 2 days and then was able to solve it. So there is nothing to worry, it will improve as you practice.

1 Like

Thanks for this, @nichke .

1 Like

Plan for Making fast Progress and increasing your speed

1>Avoid Long challenges they are wastage of time(My opinion ,#no offence ) ,in 10 days you will learn more from codeforces problem set and short contest on codeforces and short cotenst on codechef .CODEFORCES problem set are the best in the world .

2>If you are not able to solve a problem in 20-30 min and you have tryed a lot and if nothing is coming up ,go and read the editorial ,there is no point in thinking for very long time .

2*>If you are not able to solve a problem it does’t mean that you are fool/not intelligent, it simply means ,you donot know that trick to solve it which others who have solved similar problem know before .

—>Take an example when I gave few short contest on codeforces and uplsoved them with youtube solutions ,I saw that patterns get repated on Bitwise operator questions and my mind starts working …

1>Like A Xor B = C
then ==> A= B Xor C

2>Xor of (0,1,2,3)=0 , Xor of (4,5,6,7)=0 …and son on every 4 consequitive .

3>most significant bit(1) is at pos i = log2(n)
Like n= 4->0100 is at pos 2 from right .

Most significant bit matters the most Like below at pos 3 from left there is 1 but even if other bits are 0 still first num will be greater than other .
1000 >0111
(8) >(7)

…Like this I learned many properties in very less amount of time and progressed fast.

3>If you are not able to understand the editorial especially it happens in case of codeforces ,search that problem on youtube and most of its solution is available on youtube.YOUTUBE Saves lot amount of time .

4>After geeting the idea Code it by your own without seeing the solution .

4>Never miss short contest on codeforces and chef … if you miss give virual and also upsolve the problems for making progress make sure you upsolve codeforces A B C (div2) after the contest.

5>This plan works very well and you make progress very fast as it saves lots amount of time learn more in less time especially if you are in college as you donot get time as as you also have to handle your academics…

6>Its totally fine to spend much time In fixing errors it happens with everyone.

7>Never Cheat !!! Never Cheat !!! Never Cheat !!! as there is no point in fooling yourself and be Consistent…

1 Like

Thanks for the suggestions. My senior told me that as a beginner to CP you should do long challenges because you can learn the concept while referring google and gfg to solve problems, so you learn more. I’ll start doing the short contests now, I have been ignoring them till now.

1 Like