How to start Competitive Programming?

Before starting, let me tell you something to keep moving on:

  1. It is always better to have an internet connectivity for continuous practice.
  2. If you dont have an option to get internet frequently, download “CodeBlocks” IDE – mentioned below
  3. Download books / materials below and start working locally.

The first and foremost thing in competitive programming is to learn C++ in Unix Environment. It is not tough, rather easy compared with Turbo C++.  So, what is need to learn C++ in Unix? Well, it is because, there are a lot of built in libraries – for string manipulation, mathematical implementations, algorithm implementations, etc. Lets look at an example: If you want to search an element in an array – you will have to write a loop to do the same. If it is only a part of the program, still you have to do it. If you learn competitive programming in C++, then you have a library called as Standard Template Library (STL). It has a set of functions that implements quite a lot of mathematical functions and algorithms – including Sorting / Searching. What you write in 10 lines of code can be implemented in one or two lines.

Secondly, there is a concept called as “namespaces” in C++ under Unix. Namespaces are a collection of classes and objects that can be used in the program. In every program, you can see: “using namespace std”. It means you are using standard input / output in the program so that you can use the “cin” and “cout” statements.  Click here to try online compilation in c++ under unix environment. You need not depend on any other editor in the local machine. If you don’t have internet connectivity, download codeblocks, install and start working the same in the local machine.

Instructions to start with online judges:

Please follow the steps below to start working with the online judges.
You need a valid, accessible email id before you start.
Visit https://www.codechef.com/
Click on the New User (on the top right)
Choose the “Professional” option after entering the user name, password, etc. and complete the registration
Visit: https://www.hackerearth.com/
Click the “Sign up” button on the top right
Enter the details and register
Visit http://codeforces.com/
Handle is the name to identify you. It can be anything of your choice. Name with initials is the best option.
Enter the email ID and the password and register!
Here is the Power Point Presentation by Anand Shenoi – delivered during the workshop at Ernakulam on November 12. Click Here
Handout – This would be very much useful for you. Take the print of this handout if you wish to do so and use the problem set to start with.
Editorial by Dr. Swaminathan – Solution for one of the problem sets in the above handout.
More soon.

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave a Reply

Your email address will not be published. Required fields are marked *