I have read many places on Codeforces/Quora and several websites about "upsolving" and ways to do it but I am just not able to make progress overall because if I look at editorial solution, implement the problem, understand it next time something "newer" comes along and I am unable to solve it.
I have solved 700 problems across several OJs (specifically Leetcode). By solved I also include the problems where I looked at editorial solution and implemented. I have not used CF much, but from what I've seen from past Div2 contests just glancing through, I would probably not be able to solve past Div2-QB in 90% of them.
So what is the proper strategy?
Should I try the problem for 30 minutes, give up, and look at the solution? But because of this every time a new problem-topic comes up I fail at solving it.
Thanks








Yes. Practice problems that are slightly outside your comfort level to improve. If you find B problems difficult, solve B and C level problems with the help of an editorial :)
Define improvement. Does improvement mean "trying hard" for 15 months in 45 rated contests and remaining specialist? If so, that doesn't seem like improvement to me.
I think improvement means making fake accounts and saying completely unhelpful, unsolicited things to people who have no interest in the interaction.
And if this lame comment of your's was actually a genuine question, then yes I have improved a lot from where I started. I am able to do many kinds of problems I wasn't able to before. Rating doesn't capture all that I've learnt. And I'm very happy being specialist and learning new things everyday. :)
You have indeed improved a lot... such that you are now able to solve only a div 2 problem A after 50 minutes and getting many wrong answers. Impressive indeed! You desperately need to change your color to gray.
Thanks for following my results and your thoughts :) Had a bad day today :)
Hey ghoshsai5000, please ignore that guy. I sometimes read your answer of quora. You are doing a great job. Keep it up.
Yeah. Thanks for your encouragement !
Should I try the problem for 30 minutes, give up, and look at the solution?No, no, no.1)
give upNo, never give up. With such spirit you'll not get to your goal. Don't try to solve a problem, thinking that you will fail.2)
for 30 minutes??? I thing you should think about problems more.3)
look at the solutionDon't read the whole tutorial. At first just read first couple of sentences and think again. I think just reading the tutorials and imlementing the solutions you will not advance in problem solving.Good luck :) After practicing much you will get better.
Well said !
Thanks ! I hope it is helpful :)
"never give up" is a useless mantra that only wastes your time. After 12 days of being stuck and frustrated you aren't going to read the solution?
Probably it is most efficient to surrender after 2 or 3 hours though.
I think you disunderstood me, as I told
At first just read first couple of sentences and think again, but not give up, stop thinking, read the tutorial, understand the algorithm, and mechanically implement it. I don't say that implementation is useless time waste. But it doesn't advace your algorithmic skills.I have a question.
Let's say I give up in 2-3 hours and look at the solution, what am I supposed to learn?
For example, sometimes I'll read the solution, think I've understood the technique then fail some other similar problem.
In other words, how do you learn the fundamentals/techniques underlying in the problem that you can apply to other problems later on?
what am I supposed to learn?
You are supposed to learn how to use your brain. There isn't a fixed syllabus for CP unlike your school curriculum. So just learn to cope with that.
Chill bro lol.
Recently I open the problem statement and solution at the same time. I cannot spend 10 hours a day for coding like high school students, yet i have to see through a lot of problems to memorize the pattern of solutions.
Recently I feel the overall competitive programming performance depends on "implementation skill" (not important at all in AtCoder. You can train by solving a lot), "knowing a lot of patterns" (You can train by solving a lot, and it strongly depends on personal ability of memorization), and "pure brain ability" (You cannot train this at all. I wasn't given much).
If you studied math olympiad problems hundreds of hours yet you cannot solve anything in national math olympiad, I recommend quitting from competitive programming. It'd be completely boring, like my case (usually I solve problems I already know in 20 minutes and sit down for two hours for nothing in AGC).
Don't give up , you have to give your-self more time , if you think just 30 min , you will be always the same person. Give your-self, hours , days , months , don't be disappointed, it's good for you .Remember that , there is a good thing in bad times. Don't give up , if you can't solve it , then understand how he solved and why he used this way. Don't learning new things if you are not good in what you learned. Practice , practice , practice and don't give up! Don't compare your-self to others , each of us has a different mind and different skills. Work on your weaknesses.
if you think just 30 min , you will be always the same person.
LOL. That's pure waste of time. Life's too short to think about unrealistic problems.
You're training your mind. It helps you to think about realistic problems : ).
LMAO. Training your mind? You cannot become a fast sprinter by purely training your leg muscles. Similarly, if you want to solve realistic problems, then you gotta work on realistic things. Now, tell me which part of Competitive Programming helps you in REAL world stuff such as setting up networks, developing mobile apps, maintaining a large code base, etc.?
Please go to train your dragons, you came to the wrong spot
LOoLoOLOoLoOL. There is no "proper" strategy. From the way you write your blog post, I can tell right away that you are a newbie coder — only low rated coders look for a one-size fits all strategy. That's not going to happen. You gotta find something that works for yourself. If you can't, then CP is not for you. Go do something else. There are many more things in this world that are worth more than writing unreadable code and programming to specifications.
LMAO , you are being too salty , but I do agree with Lance's point here, you cant really ask people what they did , you should try all possible things and then chose the one that fits you best, needhelpupsolving, also you dont have to waste like 2-3 hours on a problem , 1 hour is more than enough (atleast for me) , but still try everything and stick with the one you liked the most....
The main thing improving boils down to is --->
SOLVING MORE PROBLEMS!
also , you mentioned you solved 700 problems..
We cant really make anything out of it, we have no idea what your rating on codeforces is.. (I mean it could be yellow , in that case you became yellow with 700 problems , to me thats hella nice improvement)
Next time please dont post via fake accounts, it might even help you in getting better feedback from the community..
but from what I've seen from past Div2 contests just glancing through, I would probably not be able to solve past Div2-QB in 90% of them.
Doesn't sounds like yellow to me. Though, I do agree that he should post with his real acc for better advice.
ohh shit, forgot about that, but I just wanted to make a point and I think you got the idea~
But sometimes I believe that solving more problems just isn't the answer to getting better. I've solved lots of problems on Codeforces and done a lot of contests (+upsolving) and am still at a pretty mediocre level. Arguably a majority of them are Div2 A and B from when I was starting out but for the past few months I've been working almost exclusively on Div. 1 level problems and still haven't really improved much.
So I do think there might be a benefit to spending more than 1 or a few hours on a problem especially since constantly reading the editorial after a few hours can condition you to rely on it too much (which sucks in actual contests). Though I'm not very good at improving quickly so take my opinion lightly lol.
there is no "SET BAR" like "solve 500 problems and become yellow/purple" it depends from person to person
and therefore the strategy should also vary from person to person.. You have realized that maybe solving more problems will not improve you but instead putting more time in problems will help you more, Ahmad .. thats what my point was exactly , do what suits you after experimenting various techniques!
Solve acm.timus.com, I suppose you will find it as nice boost in your programming skills
Correct link: http://acm.timus.ru/
Do those problems have editorials? If not, how is one supposed to improve his skills if he is unable to solve a problem and wants to learn something new by solving it ?
many users left hints for problems. I can say that you can regard the problems from different perspective. All problems are taken from real contests and sorted by difficulty. I also had such issue. I started solve this archive 1 month ago and see the difference. Thus , I suggest it. Any question?
It does not even allow viewing other's submissions after you solve a question I think, or if I am wrong correct me. At codeforces, I have actually learnt a lot of shortcuts, tricks and better ways to do things by looking at the top competitors' submissions after firstly I have solved a question my way. I will not be able to get that advantage there.
I agree with yaksha being stuck on a problem for many hours may be boring and perhaps not efficient. But there is a solution. When you have 3-4 unsolved problems you can think about them all. When you get tired of one of them, you start thinking about the next. You can come up with ideas even while not programming, or thinking about another problem. I think that will be more efficient, you won't be bored, you will be thinking about more problems. And when you spend too much time you
read first couple of sentences(of the tutorial) and think again. And, needhelpupsolving, try to solve problems which are difficult for you.The problems that you find most interesting write about them in some notebook and revise them regularly. That way some key ideas and techniques will be hardwired in your brain. Div2 A — C are mostly implementation based so you just need to practice more.