Introduction To Competitive Programming
Introduction To Competitive Programming
Competitive
Programming
What is Competitive Programming?
What is Competitive Programming?
Mind Sport
Simple way of making programming more fun
GOAL
To solve maximum number of problems in minimum time
Competition Formats:
Short Contests(Typically lasts 1-5 hours)
Long Contests(Typically lasts a few days to months)
Types:
Team Contests
Individual Contests
Programming Languages:
C++, Java, Python, etc.
Why Competitive Programming?
You’ll really learn your chosen language
It’s common knowledge among learners of human(natural) languages that the
best way to get to intermediate level in a new language is immersion: once you
know the bare minimum, put yourself in a situation where you have no choice
but to use the language. For really learning a programming language is to use it
in a contest. There won’t be any time to consult your phrase book or dictionary,
so you’ll find out soon enough if you’re actually fluent. If you’re not, then
contests will push you to get there, whether by making you use the correct
fingers to hit those special characters, learning the syntax for common library
methods, or just writing a lot more code.
It’s a way to publicly demonstrate your skills
Most developers don’t have any kind of public record other than their resume,
which often contains claims that are hard to verify because they involve non-
public work. A competitive programming score, like a history of commits to
GitHub projects, is a way to demonstrate that you can actually code, without the
need to stand in front of a whiteboard while an interviewer looks over your
shoulder.
Why Competitive Programming?
It will make you a Debugging God
Contest programmers are usually incredible debuggers, as this is a crucial aspect
of contest programming. Most normal programmers are 90% satisfied with a 99%
working solution, but for contest programmers, it's always been binary - it either
works correctly all the time, or it doesn't work at all.
Makes you a desirable candidate to major companies like
Amazon, Google, Facebook etc..
Participating in a coding competition is something you should absolutely highlight
on your resume. Having experience in competitive programming shows employers
you can work in a team, solve complicated problems, work in stressful situations,
manage time and deadlines and minimize errors. It also shows you are a
disciplined, focused and fast, which are all indispensable skills.
Rules of
Programming
Competitions
Problem Statement Example
Outcomes of Submission
Outcomes Comment
Compilation Error Executable file was not created after
compilation.
Time Limit Exceeded The program exceeds the time limit.
CONTEST IS OVER
READ ALL UNSOLVED CHOOSE A PROBLEM
PROBLEMS TO SOLVE
SEND SOLUTION(RUN)
TO TEST SYSTEM
LOOK AT THE
FIND BUGS
OUTCOME
YES ACCEPTED? NO
Standings
Resources
(Online contests and trainings)
codechef.com
codeforces.com
hackerrank.com
hackerearth.com
topcoder.com
spoj.com
usaco.org
code.google.com/codejam