CP - Week 1
CP - Week 1
CP - Week 1
Week - 1
Prerequisites
For cp there are no prerequisites as such. But to start CP you will need a decent
level of knowledge of at least one programming language.
Websites to learn :
Some websites from where you can learn and compete and some important
competitions.
Codechef :-
● 3 monthly contests :- Long challenge, Lunch-time and
Cook-off
● Weekly contests named starters
After Completing the Basic Prerequisities:
After we have learnt a language, we can now get started with actual
problem solving.Problem solving requires understanding the problem statement
and designing an effective algorithm that successfully solves the task at
Hand. The efficiency of algorithms is very important in competitive
programming. Usually, it is easy to design an algorithm that solves
the problem slowly, but the real challenge is to invent a fast
algorithm. If the algorithm is too slow, it will get only partial points or
no points at all. Thus comes into picture the concept of time complexity. The
time complexity of an algorithm estimates how much time the algorithm
will take for some input. The idea is to represent the efficiency as a
function whose parameter is the size of the input. By calculating the
time complexity, we can find out whether the algorithm is fast enough
without implementing it.
Here are some resources which will help you understand time
complexity : -
1. [optional]CPH (Competitive Programmers’ Handbook) Chapter 2.
- Do read this chapter thoroughly without skipping to get a
complete understanding of Big O notation etc.
2. Big-O notation in 5 minutes
Big-O notation in 5 minutes — The basics
3. This might help you in avoiding Time Limit Exceeded error
Foot note:
If you are very well with above concepts you can start doing leetcode or this
sheet [Take the topic arrays go in a sequential manner]
References for Algorithms:
1. Handbook (CPH):- You can find 90% of things you want to
learn in this book, but I would not recommend reading this book
completely and then starting solving problems. Just refer to the
book when you come across a topic which you haven’t heard
before.
2. CSES :- The author of the Handbook has also made a
compilation of 300 really good and conceptual problems which
covers almost all CP topics. But it doesn’t contain problems
sorted according to difficulty so you will have to estimate it using
solve count.
3. USACO Guide:- This is literally the “one stop shop”. This
website is generally referred to USA computing olympiad
aspirants and it has everything in sorted order. And it has
divisions like Bronze, Silver and Gold. It will mostly refer to the
Handbook and explain solutions of CSES problems also.
4. CP-Algorithms:- Contains all CP topics but again not in
sorted order of difficulty. So, refer to it only if you are stuck on a
topic and couldn’t find it in the Handbook.