Skip to main content

Competitive Prograaming From 1000 rating to 2400+


Okay, so let's talk about some strategies for competitive programming.

I was once a gray coder as I was totally new to programming when I entered codeforces.

FROM GRAY TO GREEN:
   
First of all, you need to be good at brute force and implementation. If you are a complete beginner then do 20-30 800-1200 problems and you will b good at solving A level problems in 5-10 minutes. The try to do B in a live contest in 15-30 minutes only. By only this you can shift your rating to 1200 or so.

FROM GREEN TO CYAN

Now, to increase your speed you just need to practice more A and B level problems.
As you are now quite confident of solving A and B level problems you must now try C also which is generally of 1400-1700 rating. This require some special techniques such as prefix sum, or some simple trick methods for reducing time complexity. Now the mistake I did was I tried to learn more advanced data structures such as graphs, trees, KMP algorithm, etc and that wasn't needed for C level problems. But in actual practice, the theory of these is quite simple but hard to implement in questions unless you are strong at advanced implementation questions. So doing C level problems is a must for advanced techniques. So, do around 50-60 problems of rating 1300-1700 in the problemset of codeforces.

FROM CYAN TO BLUE

Okay, so here comes again the speed part. You can be a blue coder very easily if you can solve up to C or D in a div2 contest if you are accurate and have great speed. To increase speed, You must do virtual participation in contests you have missed. Now it's the time to learn some typical algorithms without which some questions can't be done.
So here is a list of those algorithms and the tutorials and questions for the topics.
(for questions I recommend you to go to A2OJ in the categories section)
>Dynamic Prgoramming
Okay this is a pretty cool topic and covers very much in it.
So here is some quick explanation: Dynamic programming is generally used in cases when you are counting anything twice. Though a very simple idea it can make your time complexity go from O(2^n) to O(n^2).
It normally includes counting number of ways type questions or the max or min values type questions which normally asks you to go through every possible case(or a subset of case).
Here are some resources to learn(free):
  • GFG articles  on D.P will give you enough knowledge for a start. Try to solve some famous questions like 0/1 knapsack, Longest common sub sequence. Go through their explanation and try to figure the basic idea and steps like how to make a table and what does the columns and rows represent. 
  • HackerRank: Do DP and recursion tagged problems and be very cautious here. Do only medium ad hard questions because there are no easy questions XD. Sorry if it was not funny.
>KMP Algorithm: Simple plain algorithm used in string matching. Though a bit tough to understand and implement it is very much used in many codechef and codeforces questions.
>Binary Search: Though you might be already familiar with binary search already but it can be used in many trick questions whose approach is not instinctive.
>Binary Indexed Tree: Though it is rarely asked in C level problems but is used frequently in D level problems.

Comments