Intro

It has been days since my last post and I don’t think I could keep up making more posts in this site. So I decided to make this even though I don’t feel qualified enough to talk about Competitive Programming or CP for short. If you don’t know what exactly CP is, chances are that you are still in your school days. The reason I say so is due to the fact the most people who are aware of CP either entered their college or had passed out from it or maybe those who spend most of their time in the internet and come to know the existences of CP.

So without further ado let’s start with the code editors, setup and a few other things to keep in mind.

Code editor

So the word Code editor isn’t something fancy at all. Like MS Word being a text editor there are some software that are made mainly for coding purposes. Some of those code editors are :

  • Visual Studio Code
  • Sublime Text
  • Atom
  • Vim

and more…

The most popular being VSCode (Visual Studio code) for its lightweight nature and a lot of extensions making your coding experience better. I recommend you to install VSCode for CP since further down this post I would talk about the setup in VSCode that is kinda useful in CP and of course it being lightweight makes it easier to uninstall you you fell you don’t have the knack for it. Remember to try out other code editors as well and see which suits your habits.

Programming Language

Ok you have a code editor.

Now What?

Now comes the hard part more or less

I recommend the C++ programming language because of its built-in programs and data structures which would make CP easier. Some say to get started with python too, which is also fine. Here in this post I will link the resources to have C++ running in your VSCode.

Step 1: Download and Install C Cpp Tool set ( gcc g++ gdb ) in Windows

Step 2: Executing C++ files in VSCode

With the intellisense for C/C++ installed in VSCode it would give you guys an easy time to type in the code you want. Again I say, its not like you have to only code in C++ for CP. Go with you your preferred language at the early stages.

Learn and Practice

The environment is setup and now is the time to go take a dive into CP. I strongly recommend LeetCode. It has beginner friendly problems and a community where many give solutions to the said problems in various languages. LeetCode also holds some CP contests but we shall get back to it later.

If you are using C++ make sure to check out the Standard Template Library or STL for short. It is super helpful by making your code’s syntax a lot smaller.

Where to do CP?

There are many CP contests held in many websites and here is a link that lists out ongoing and upcoming CP contests.

Many popular CP sites are:

Conclusions

CP is neither fun nor annoying. It just like another set of problems with a bit of math and some knowledge of computer science involved. I did enjoy it for some time and still attend some contests if I have free time. Similarly if you feel like it give it a try and do not worry if you are not up to the task. Its not like the every real-life problem has a run-time constraint.