I spent more than 10 months of consistent training (almost every day, every week) and I have no improvement at all.

Yesterday, my rating is dropped below the level where I was 12th October 2015 (a day of my first contest).

Usually, during contests, I can solve Div2 A for 10-15 minutes, Div2 B for 20-30 minutes, rarely I can solve Div2 C when it's easy. I was at that level in October 2015 and I'm on the same level right now (August 2016).

I still can't solve Div2 C problems and I'm still can't solve problem B quickly without mistakes or being hacked.

So I have zero progress, zero improvement of my problem solving skills after 10 months of almost every day training.

I think there is something definitely wrong with my training method because it's absolutely ineffective.

I'm looking for training advice from experienced participants because I don't want to spent another 10 months and end up exactly at the same level where I was 10 months ago.

My background: I'm working as C/C++ developer since 2009 (early days I was mainly C developer, currently I mostly C++11 developer).

**Here is detailed description of my training program:**

Every time I'm training on CodeForces, I set up timer for K number of minutes (where K%15 == 0). For me, it's psychologically easier to not to be distracted during specific time frame. Also, I have a journal where I put how much minutes I spent on training every day (including contest time). I keep only "clean" time in my journal, i.e. time when I was not distracted at all. I work in silence and don't listen music during training.

Also, I keep a journal of solved "hard" problems (every entry: day => number of solved problems, usually just one). I consider a problem as **hard** when the problem **level >= Div2 C**. I consider hard problem as solved in two cases:

- I solved problem without any hint;
- I looked at tutorial, then put off problem for a few days, and after try to recreate solution, and make sure that I feel confident that I really understand solution;

I don't consider hard problem as solved if I implement it immediately after I read tutorial or when I don't feel confident that I really understand solution.

I started training on 10th October 2015.

Since 20th February 2016 I keep journal of how much time I spent. Since 11th May 2016 I keep journal of how much hard problems I solved.

Here is my fresh statistics of training:

I spent **89.45 hours** in last **93 days** (from May 24th till August 24th). It's about **0.96 hours per day** in average or **6.73 hours per week** in average.

I solved **26** hard problems in last **93** days. It's about **1 hard problem in 3.57** days or **1 problem in 3.44 hours** (often combined time for a few days).

Usually, I can train 15, 30 or 45 minutes in the morning before work and 30, 45, 60, 75, 90, 120 minutes in the evening after work.

I'm keeping TODO list of C problems by adding CodeForces rounds to favorites. Usually I add about 20 rounds to favorites (when list is empty) and then work on them starting from down to top of the list till it becomes empty. If I put off problem for a while, I remove from favorites and add it again so that problem will be on top of the list (since I take problems from back of the list).

Typical workflow on problem Div2 C (note that steps could be split into several days):

- Trying to solve problem for 1.5 hours (could be split into two days);
- Look to tutorial for a hint. It means I can read only first few sentences of tutorial till I get the idea of how to solve problem but don't read entire tutorial. For example, I can read that solution uses two dimensional DP array with states k, m. After that I'm trying to came up with rest of solution on my own;
- If I'm still can not solve after another hour, I read tutorial and comments till I understand idea of solution. It could take hour, two, three during several days till I really understand what tutorial is talking about;
- When I finally understand solution, I put off this problem for a while (i.e. put to the top of the list). After a while, I check whether or not I really understood solution. If I can easily recreate solution after one or two weeks, then I really understand;
- I usually can't solve C problems without hints from tutorial. Sometimes, I can't even solve it with tutorial since I don't understand solution at all. In this case I drop the problem for uncertain period of time (i.e. remove from my TODO list);

So usually, my work on a problem Div2 C can take quite a while. For example:

Day 1: Spend 1.5 hour, can not solve;

Day 2: Look for a hint, try to solve with a hint for another 0.5 hours. Still can not solve;

Day 3: Look at tutorial of the problem and all comments for 1 hour, finally understood solution, put off problem for a few days;

Day 4 (after a few days or weeks): Spend 1 hour to implement solution;

**Possible reasons of inefficiency of my training program:**

- I spent too few hours per day on average. ~1 hour per day is not enough. It will take years till my rating become stable blue;
- I spent too much time on Div2 C problems. 26 problems in 93 days is ridiculously low number. I should somehow solve 26 problems in two weeks, not 93 days to get any measurable progress;

Please, help to fix my training program.

P.S. I read CodeForces classic posts about training:

The 'science' of training in competitive programming

How to come up with the solutions: techniques

I know things like zone of proximal development

The problem is that **Div2 B** is too easy (more than 90% of success) while **Div2 C** is too hard (low success rate). It's too big gap between **B** and **C**.

Auto comment: topic has been updated by omgcoin (previous revision, new revision, compare).Comments here can be really helpful :)

http://codeforces.com/blog/entry/2332

also check this :

http://codeforces.com/blog/entry/17842

http://codeforces.com/blog/entry/16599

The question has been asked before, so I take it that you have read the other blogs. I personally would recommend you to spend more time on harder tasks (let's say Div2 C/D/E), this w/ay you learn new ideas. Also explore "standard" topics such as graphs(not just bfs/dfs but also algos like Prim, Dijkstra, LCA) , dynamic programming, etc. Try not just to learn them by heart, but to understand how and why they work. Many graph problems are just adaptations of already known algorithms. You must first learn the theory, then practice. I think that you set aside enough time to improve(well, maybe not enough for becoming red, but you can definitely become purple). And the most important, have fun while solving problems :)

Hi!I am a beginner. What do you mean by this line"Try not just to learn them by heart, but to understand how and why they work. Many graph problems are just adaptations of already known algorithms." Should one memorize/by heart some implementations? What do you mean learning by heart here? I mostly try to understand the logic behind the algorithm/ data structure, then see it's implementation. Then, i do problems. Can you elaborate on what is your basic approach of learning new algorithms and data structures? How should I learn so that I can implement it fast in the future if required? You can message me instead of commenting here. Thanks!

When I want to learn a new algorithm, I first read the theory behind it, try to understand the basic concepts it is using, etc. Then, I usually try to implement it on my own first, to be sure I have understood everything. If I get stuck (for ex. I couldn't implement a treap the first time), I search for some good implementations on the internet. Once you're done with that, try to solve a problem with the implemented algorithm, and search for faster/shorter implementations. Sometimes the final solution turns out to be a mix of what I find online and what I wrote myself. Plus, by looking at other solutions, you improve your implementation skills. But never forget, you should understand every line of the final implementation — otherwise, you'd have a difficult time tweaking the algorithm for other problems.

About learning to implement it fast, I recommend trying to implement the algorithm for different tasks without looking at your previous code, preferably on the next few days after you have learned an algorithm (if you make a month pause between learning the algorithm and practicing it a bit, you have a high chance of forgetting it). Here you also get a chance to see if you really understood the algorithm + implementation, and that you can tweak them when needed (so try to pick also harder problems with that algorithm).

Final note, for online competitions or ICPC, you can just have a library of all algorithms you've learned and implemented yourself, and copy them when needed.

Thanks a lot.

http://codeforces.com/blog/entry/46304 contains the rating of CF problems ... you can start from rating 1800

Go to acm.timus.ru and solve 500 problems there. You will be violet after that.

Actually, i don't think 500 is enough... I will test it, after I finish my 500th problem on timus.

Maybe SGU

Did you?

I got violet, but I don't think strategy "solve 500 on timus" is best for achieving some rating on codeforces. However, you can try it, it will definitely help you.

Is it because times is toughest judge??

then which one is toughest?

Hi Emiway, would you like to collab ?

I don't understand what's the point to solve problems on acm.timus.ru instead of CodeForces.

Timus doesn't have tutorials, so it will take me forever to solve 500 problems.

I took two contests on Timus. After contest, I just abandoned problems I didn't solve during contest since there is no tutorial and I have no idea how to solve them.

If get stuck and there is no tutorial, it will take weeks till I came up with solution (if came up at all).

So in order to solve 500 hard problems without any manual, I have to spend up to 40 years!

My whole problem is that my pace of solving problems (even with tutorial!) is ridiculously slow (23 Div2 C problems in 93 days). And I don't know how to fix this.

It's the key thing! You get used to read editorials too early. But you don't have editorials on real contests! If you don't know how to solve a problem, postpone it. There are always problems you can solve. Learn new algorithms and tricks in parallel. Try to invent approaches on your own, it helps a lot. Someday you remember an old problem that you couldn't solve before and get AC with the help of new knowledge.

The other thing is that Timus doesn't allow you to watch tests. On Codeforces your desire to see what's wrong is too high, and you can't reject it. Then you get stuck in a round cause you don't know what to do without watching tests.

That's how it worked for me. I have 477 now, but I didn't solve much of last two pages. I reached stable 1900+ rating when I had 350 or something like that (taking into account that a lot of easy problems are added, this number is 450-500 now)

I understand what you are talking about. I think it does make sense.

Although I have a question about this approach. In particular:

But I can't invent everything on my own. For example, Dijkstra invented shortest path algorithm, Fenwick invented binary indexed tree, Knuth, Morris and Pratt invented string searching algorithm. And they are famous scientists.

If I know nothing, I can not become simultaneously Dijkstra, Fenwick, Knuth, Morris and Pratt. It's just unrealistic since even Donald Knuth get most of his ideas from other fellow scientists. I.e. it's impossible invent all classics independently in human lifetime. I think science (at least modern) is all about sharing and invent new ideas on top of ideas from predecessors.

I think I should read classic books about algorithms a lot in order to be able to invent some form of modified Dijkstra algorithm etc.

In order to solve 500 problems within two years. How much you recommend to struggle on single problem if I get stuck before put problem off?

I strongly agree with you.

I used your method of trying to come up with solution on my own for years. It is too slow.

Actually, I've been planning to try the opposite — make a list of 50 medium problems (div2c, div2d) and try to come up with solution only for 10 or 15 minutes. After that open the solutions of Nutella coders and read till fully comprehended.

Currently, I don't have enough time because of the tight schedule on my work, but I think I might have a free week in October.

I meant not these famous algorithms, but rather simple tricks like coordinates compression or "process N queries a[L..R] += d, then output all a[i]". You can't read about these tricks in books but they are not very hard and extremely useful.

I didn't spend more than 1 day, but unsolved problems always floated up in my mind passively. If you can't solve a problem now — it's just too hard for you. Try other problems and get your XP. Remember: there are always problems you can solve. It's all like in computer games: if you can't beat the boss now, don't try again and again, better go earn your level and equipment first.

:|

What?

Is it because times is toughest judge??

then which one is toughest?

Because it has good problems for everyone

Is it specific to Timus only and not Uva?

Do you follow CP3 book?

Solving random problems is not a good practice strategy. By doing this, you learn a lot of new techniques and algorithms, but you forget about them immediately because you never applied them (except the single time when you learned it).

Picking a topic and practicing it is much better. At https://a2oj.com/categories you can find lots of problems for each topic, sorted by difficulty. I suggest starting with one topic (e.g. dynamic programming) and doing problems for this one category for some time (2 weeks or longer). As long as it takes you to get comfortable with it. Then change to the next topic.

I've asked different persons about this strategy (pick a technique , study it and solve problems on that technique.) and it turns out to be a bad practice when to solve problems while you already know its technique . I've always been suggested to just try as much as I can with a problem and then if I can't yet solve it , I can check editorials or see tags about which algorithm should I know to solve this problem . Then study this algorithm and solve the problem.

I said "As long as it takes you to get comfortable with it.". I don't that the OP is completely understands every detail of the technique when he solves it once with the help of the editorial. I know, that I don't.

The topic/technique can come up in different forms. For instance, if you only solved a handful of DP problems (with help), you'll probably not recognize the next DP as such. DP has so many different looks.

Another thing is the following aspect. If I learn a new algorithm in an editorial, I probably can't code it again the next day. Especially if it is a little bit strange (BIT, KMP). But after doing 10 BIT problems in a week, I now can code the algorithms in my sleep.

Solving one problem doesn't make you master the technique. It takes a lot of repetition and practice.

You're right (Y)

also after trying as much as I can with a prob , search for the algorithm , study it & solve the prob , like u said I can keep digging with the same algorithm and solve problems until am comfortable with this algorithm . after that I can keep going solving problems WITHOUT knowing the algorithm . and keep looping ;) all am saying is : - solving problem without any clue about its algorithm is necessary .

There is a course on coursera called Learning how to learn.

They called the method that you described as

crammingand they said that it is a bad strategy in the long run.Instead they proposed to solve problems randomly. This technique is called

spaced repetition.These are not my thoughts. This is what you'll learn if you participate in that course. They talk about it with much more detail. They also cover how our brain works, so that one could understand why we should prefer one technique over the other.

I think you waste a lot of time thinking. You should try to think 10-15 minutes on a problem and if you don't have any ideas, just read the editorial. In a such a manner, you will get more "information" in less time.

due to my experience, i can suggest you train as afaxnraner said. try to acquire basic techniques first then move on to solving random div2 C problems. you can see this comment.

as an example you said that if you couldn't solve a problem you see the editorial and sometimes it took a lot of time for you to understand the editorial. well, let's assume that the problem is about DP, if you are not familiar enough with DP you will have a hard time understanding the editorial (DP is real magic when you first learn it). on the other hand, if you are familiar enough with DP. understanding DP solution will not be that hard at all. you just see the definition of the state and the transition and that's all you want to understand the solution.

this argument is due to my own view and experience. it might not be applicable for your situation. i hope it helps you a little :)

Well,i'm not so strong but as far as i can suggest is to read ikatanic's comment.

Do you have such a friend ? (Related to ikatanic's comment)

geniucos solved +1500 problems,but i believe it is possible to become red without solving so much problems,for example solving the easiest 100 problems from 10 judges won't increase your level while solving all the problems from POI (there are ~450) will increase your level a lot.

My whole problem is that my pace of training is extremely slow.

I actually do exactly what ikatanic said in comment you mentioned.

Quote from his comment:

That's exactly what I'm doing right now.

And using this method I solved only 26 problems in 93 days. It means in order to solve 1000 problems, I should spent 9 years and 9 months. That's my big problem!

9 years and 9 months isn't accurate since you'll probably solve problems faster and faster, I think that if you'd train hard for more than 2h/day you should be able to reach 1000 problems in like 1-2 years max.

That's how I thought 10 months ago (that I speed up).

The problem (a big problem!) is that I didn't speed up in last 10 months.

So I solve Div2 C problems as slow as 10 months ago.

Something is definitely wrong with my training.

Well, when I train I usually don't spend around 1.5h on a problem, if I don't have any idea how to solve it I usually read the editorial after 15-20mins max sometimes I don't even bother to write the code, I just try my best to understand the key idea of the problem and then move on and consider that problem as solved.

Also I think that participating in as many contests as possible is good ( CF standard round + education, csacademy's rounds and so on).

P.S.: I've gone from struggling to solve problem B ( 4 months ago ) to solving A-B-C easily ( almost every time ) during the contest and I either solve D during the contest or several minutes after, so my training routing seems to be working so far.

One of the idea I used to train for competitive programming is

timinghow much time it takes for me to solve the problem. After about a month, I comfortably get 2x speed improvement.Why? Because it's vague to see why you are slow. Maybe there's some knowledge you are missing. Maybe it's your coding skills. Maybe your thinking is not clear enough. Timing the problems allow you to see clearly what's going on under the hood, and forces you to work on what you are weak at. I don't know what's your weak spot, but typically in programming contests you are bound by your weakest spot, and only by improving such point you can grow better.

Thank you for advice!

What exactly do you mean by:

How to use this in my practice?

Is it because POI is toughest judge??

then which one is toughest?

Just curious, outside of programming contests, how much do you feel that this practice has helped you in becoming a better programmer?

Just give up

I think spending some time solving educational rounds question (especially beyond D) is a good idea, there are a few good sample questions for learning new algorithms.

Also,focusing on one topic is an effective way to practice. Try to read the editorial of the first question, after implementing the editorial and fully understanding it and how it was came up with then try other questions of the same topic. I think this should be better than scratching your head for 1.5 hours with nothing done.

Most importantly, you should read more hard questions, even if you aren't confident in getting AC for certain questions, you should still submit your code to seek flaws from the tests. Test cases help a lot in fixing logic loopholes than yourself. Moreover, you can gain experience of implementing some algorithms, and make sure you don't have to waste time learning it again just because you have forgot it.

It's not about efficiency. However, it's about quantity.

~0.96 hours per day may be too little for newbie (excluded talent). I suggest to train at least two hours and solve >= 1 you so-called hard problem a day.

And I think the ``dark time'' is also very important for significant improvement. When you are walking, you are eating, and you are taking shower, keep one or two unsolved problems in your brain and try to think of them. It's the best way I have ever found to utilize the time.

Currently, I spend about 1.5-2 hours for a problem Div2 C before looking to a tutorial. Then about 1-2 hours to understand a tutorial and implement solution. I.e. it's about 4 hours to completely understand and solve a problem (more detailed explanation how I do this in my post).

I'm too slow to solve 1 problem within two hours every day.

What do you recommend to do to speed up? Would you recommend to look at tutorial earlier (i.e. after 30 minutes if I get stuck)? Or may be I should solve problems by topic to speed up?

If you are reading the tutorial early then make sure that you thoroughly understand the solution, it's easy to pick up a bad habit of missing out something important that make sure the algorithm works.

I think I will put off problem after reading tutorial and get back to the problem after one week so that I will make sure I can implement it after a while.

If you spend 4 hours to solve the Div2 C even with an editorial, you set the bar too high... Try to find such difficulty level that you can solve 50% of problems in that difficulty level within one hour on your own, and solve as many problems of that difficulty as you can. If you manage to do this you will progress... may be not as fast as you'd like, but I am sure you will.

I can solve div2 C within an hour 80% of the time. But, when it comes to div2 D, i have almost no idea. Any tips for me ?

You can try to use this list to find CF problems that correspond to your rating.

"When you are walking, you are eating, and you are taking shower, keep one or two unsolved problems in your brain" This is really helpful , I always do this and eventually got AC for such a problem . This comment should be upvoted twice :D

I'll second the poster above me -- 26 problems in 93 days is absurdly small, so you definitely need to up the quantity a little. As a ballpark, you want to reach at least something around 500 to improve, and you'll take a very long time to get there in this current pace.

As for topic-based training, every red coder I've seen comment about it seems to dismiss the idea. I don't know if it's possible to get better from it, but it's certainly not

necessary.(edit to make it sound less harsh than it probably came across as the first time)

I understand that it's absurdly small number. I understand I need to solve ~500 problems to improve. But I don't understand how to speed up.

What I should change in my training to solve 93 Div2 C problems in 93 days? Should I look to tutorial/editorial earlier (i.e. may be after 30 minutes instead of 2 hours)?

Why sorting problems by topic is bad idea? Sounds good idea to speed up?

If you're short on time, maybe you could do what ftiasch suggested and read a problem, then use your downtime during the day to think about it. Then when you actually come to practice time you should have already thought a lot about that problem. I would read the tutorial earlier too, 4 hours is too long to spend in a single problem. The optimal time should be when you stop making relevant progress, so I can't specify it for you, but I believe I spent about an hour per problem when I was starting out, and this counts implementation too.

When you see a problem you should be trying to simplify it as much as you can, and then the simplified problem is either very easy to solve or you can apply some well known technique. A second advantage of random solving is that you will meet techniques in the same proportion that they are relevant.

Solving problems by topic doesn't teach a lot of problem solving, because it tends to lead to the "going through a list of known techniques to see which one of them applies" approach (and then if none of them apply, what do you do?). Problems in contests don't have signs saying "this should be solved using DP", so you need to learn to simplify problems without this help.

I think topic-based training is somewhat useful in learning new technique, especially data structures. It doesn't teach you how to solve a problem, but it helps you code faster and more accurately. It shouldn't be done too much though.

you have to solve a lot of Div2 C ,here is a list of Div2 C problems sorted by their difficult , try to solve as you can HERE.

Do a lot of virtual contests starting from old contests which is easier , and try to solve problems you didn't solve after the contest by reading the tutorial .

when you can't solve a problem after 30-60 minute , read the tutorial and solve the problem maybe there is a trick or algorithm you don't know ,if you found new algorithm or data structure you don't know in the tutorial search for it and solve about 10 problems related to it.

Have you thought about possible psychological reasons? For example:

Expectations: you assume you should be able to solve div2-C problems faster than you were 10 months before, but you don't. It's possible that a lot of your brainpower is wasted thinking on stuff like that while solving problems.

Biases: you know the B-C gap exists, and you know your (low) success rate on these problems. So, it's possible that you are "treating" Div2-C problems with fear and with no so very inner hope.

Evaluation anxiety: lot of people just sucks at doing exams and things under pressure.

Also, maybe what you lack is mathematical training. I mean, your coding abilities are nice but you have no training on how to prove things, you don't know some math properties and fields that are supposed to be known in competitive programming (for example, basic combinatorics) and therefore you often don't grasp algorithmic concepts and ideas. Lot of competitive programming problems are esentially math in some way or another (even if they are not about number theory or something similar).

These are good points.

Studies also show that participating in contest while answering questions of your colleagues affects your performance :)

are you doing contest while you're busy at work? doesn't sound like you can focus on solving in a situation like that

Contests at weekends became pretty rare, so I have no other options =)

you have virtual contests at Codeforces or https://a2oj.com/

Well, this is my case too. Contest are frequently at 12:30 PM EST time in the middle of my busy work day.

Don't focus on ratings. Do you enjoy it? Can you not imagine your life without it? Yes and yes? Keep going. Yes & no? Keep going. No and no? ...

If you love solving problems, you'll push yourself harder. Once problems of certain difficulty become easy for you, you'll automatically want to read complex algorithms/data structures/maths because that's what you're here for. You're here to think hard and solve problems. But, you'll have to love the journey first. Destination is unfortunately, unknown. We don't quite know how much we'll improve, we're just enjoying our time here.

I dunno your answer, but I think the answer to make you successful should be because you

loveit. If you really loved it, you would have no time to measure how much time you spend because you would not have even enough time to satisfy your love. If you really loved it, you would not care about improve or not. You would just delve in coding, and feel so happy if there is improvement.If you really loved it, you would not seek for any mental strategy from anyone else because it is like taking a night class after school or finding a home tutor to revise the damned thing you learnt at school. You should just do it your way and just spend time when you have. Dont care about it, dont think about it, just let it go.

I believe that people are naturally gifted. A lot of training sometimes does not really help. Even the great coders do not know why they know how to solve a problem. Ideas just come to them. So instead of training to be bloody red coder for nothing, just do it if you find it funny and let time help you.

(My answer for those questions is I am addicted to coding, :'( , I feel uncomfortable when I cannot do it, so I cannot quit it or cannot improve either :'( :'( )

What about Petr?

If you go to a gym and start randomly exercise without any system and knowledge how to use each training equipment correctly, then you get stuck after a few months. You get stuck especially if you eat random food without any idea which and how much carbs, fats, proteins you need.

My point is that bare fun is not enough (but

necessaryof course). You do need system of training if you want to achieve high results.Not true. There are whole class of high paying jobs which offers extremely challenging and non-trivial tasks. To get this type of job you have to show

outstandingproblem solving skills. Examples: Jane Street, D. E. Shaw.Being red means that you can easily grasp hardcore math books (especially discrete math). May be you can solve unsolved problem one day? Who knows? CodeForces is an

excellentplatform toearnproblem solving skills.Etc

I have participated 198 rated contest in codeforces ( hardly missed any contest in last 4 years ) and solved more than 600+ problems here. Actually I solved 2000+ problems from different online judges ( Uva , Loj etc ) and its not a small amount. I used to able to solve Div2 A,B,C in January 2014 and my rating was around 1500 and still so , in short there is no improvement for me in last 2 and half years.

Its hurting but its not true that i haven't improved and learned. I have made more mistakes in last 2 and half years. So i have learned a lot from them.Eventually we all are improving as long as we are thinking. There are three phase for every competitive programmer.

what i believe in last two year i have improved from stage one to two and haven't reach in stage three yet. As i am working now i don't have that free time for practice that i used to have.

As long as one don't give up and work towards his goal success will come sooner or later. So keep going and don't think too much about why you aren't improving. Fact is you are improving. Solving is improving , participating is improving. All the best :)

I don't believe in going so beyond of current skills ! Small successes can help people to keep on their way for big success. ( just my experience )

I hope helps : http://codeforces.com/blog/entry/46021?#comment-305566

hi, i also have a question if someone minds helping me.

i usually spend a lot of time thinking on a problem.

while training, as long as new ideas come to my mind i still try to solve a problem my own. and before giving up i set something like an hour before searching the solution (as a final resort for some magical idea to come to my head).

for instance, i spent something like two days and a half on problem 709E - Центроиды. luckily, i managed to solve it.

however, the question is: is it a good practise to spend a lot of time on a single problem or is it better to strict a fixed amount of time for a problem?

i basically do this because aside from CF finding a solution is hard and understanding a solution is harder. even CF editorials a lot of them are not that clear. besides that, after seeing the solution you can't tell the intuition behind it.

thanks for any help :)

Do you mind helping me?

I still can't get AC on that problem(Centroids). Can you tell me how it can be solved with LCA? I'm confused because the test case I'm failing on is huge. You can refer to this to know my idea with LCA and link to code. I'll really appreciate your help.

it's my pleasure to try helping you :)

@omgcoin

Did you quit CP? Or CF? Or did you not follow the advice of the comments? Because sadly there seems to be no improvment in your rating.

Please dont mind but I am asking because I too am an ungifted CP enthusiast doing CP with a poor math background only for a better job.

Is duckladydinh comment true? Are some people cursed for mediocrity?

You can also read this post: https://www.quora.com/How-did-Anudeep-Nekkanti-become-so-good-at-competitive-programming

Hi omgcoin

Let me share my experience. Firstly, don't get disheartened. 26 is not that big of a number. I started seeing the magic and stopped being afraid of C problems when I had done about 55 C level problems.

I too was at a stage where I could only do A and B really quickly and then drew blanks at the C-D level.

What helped me improve was the following — - Find a Mentor. Find someone with whom you can discuss problems with. Editorials are pretty badly written on average. Find someone who is better than you and tell them your current idea of the solution and they could try nudging you in the right direction. - Maintaining a diary — This is very important. You are already doing it, I maintain a diary too. But rather than collect raw data about a problem, I write my thoughts and feelings about a problem. Write how much of the problem you could solve and which part specifically you missed. For example, you could write "I got the idea of being greedy and sorting it but I didn't understand exactly what should be binary searched." Or "I saw the idea of fixing 2 variables and forcing the third before but I didn't have the idea that you should avoid division." or "I understood it was some kind of DP, but I did not understand how many variables each state should have." SOmetimes the solution will be completely different from anything you could have thought about.

This kind of introspection is very important. FOr example, in a recent contest I was not able to solve the question Fair. But I understood the solution presented ! NOw, it's not enough to understand what the solution is, understand why you didn't get it. And the reason I didn't get it is because — 1. I had not seen the idea of doing BFS from multiple nodes before and 2. I wanted to fix a vertex and then find it's distance to each colour, rather than fixing the colour and then finding the distance to each vertex.

I learnt this from a chess website. Many chess players often maintain a diary of their thoughts for important games to understand what they missed.

Now, even I used to wait for a few days to internalise the solution but then that puts me under too much stress. So what I do now is solve it after reading the editorial and if I find it interesting enough, I write a post about that question's solution and explain it in detail in my own words on Quora. :)

So, to summarise, maintain a diary of all problems and do introspection. Ultimately, you'll find a large majority of C problems can be answered by being greedy and sorting or doing some kind of nice DFS on a tree. My fear of C and D level problems finally went in April.

Nowadays, I might not be able to solve C on every contest I enter. But, I am definitely confident that I can upsolve C with the help of the editorial and other people's codes after the contest ! Ultimately, I participate in competitive programming to increase my knowledge. So, it does not matter much to me if I solve it during or after a contest. Right now I am confident I will be able to solve a C question with the editorial if I am not able to solve it on my own. I hope you will reach this stage too. :)

Wow! thanks ghoshsai5000 . This is very helpful to me.

Glad I could help :)

I think this methodology applies broadly to life. Svlad_Cjelli once told me to keep a dairy about girl and I find 90% improvement in picking up girl

Proof: http://codeforces.com/blog/entry/58589#comment-422225

I will tell you honestly. Competitive programming is nothing but a social construct. They make you learn these algorithms like Dijkstra, and you will never use it. Why use Dijkstra when you have Google Maps to run a faster version of Dijkstra for you? Oh, and it's much faster than O(n log n) (just count the number of cities, if you don't believe me).

Yeah, when you do CP you like to take a pride that CP will be useful to your life. Yeah, you think that performing Greedy will help you choose the best partner, or that Floyd-Warshall can help you calculate distance from each pair of potential partner's house. But it's all wrong.

It's not big to say CP is just another "useless talent," like learning to catch firefly. But of course, it will glow inside you internally.

Haha, agree up to a point. Firstly, I'd consider this reply is from someone who couldn't have done well at CP, because, imho, it is not a thing that a high-rated person would say. Secondy, I always have believed that CP isn't just learning a bunch of so-called "useless" algorithms, but rather teaches you to compete, improving your competitive skills. In addition, it's also taught me to do things "effectively".

But I agree with everything that you've said & it's not worth to dedicate whole/most part of your life to CP (maybe) ^_^ :)

P.S I strongly believe all that wasn't a sarcasm:)

Did you forget? You're not supposed to use greedy, use maximum bipartite matching

"to keep a dairy about girl"

Why is it down-voted? This is so good. Thanks.

0.96 hours per day?

Now after 3 years you are still a stable cyan. So what would be the problem? :)

.