Online Judge
   HOME

TheInfoList



OR:

Competitive programming is a
mind sport A mind sport, is a game of skill based on intellectual ability. Etymology The first major use of the term was as a result of the Mind Sports Olympiad in 1997. The phrase had been used prior to this event such as backgammon being described as ...
usually held over the
Internet The Internet (or internet) is the global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a '' network of networks'' that consists of private, pub ...
or a local network, involving participants trying to program according to provided specifications. Contestants are referred to as ''sport programmers''. Competitive programming is recognized and supported by several multinational software and Internet companies, such as
Google Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
and
Facebook Facebook is an online social media and social networking service owned by American company Meta Platforms. Founded in 2004 by Mark Zuckerberg with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin Mosk ...
. A programming competition generally involves the host presenting a set of
logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of logical truths. It is a formal science investigating how conclusions follow from premise ...
al or mathematical problems, also known as puzzles, to the contestants (who can vary in number from tens or even hundreds to several thousands), and contestants are required to write
computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
s capable of solving each problem. Judging is based mostly upon number of problems solved and time spent for writing successful solutions, but may also include other factors (quality of output produced, execution time, memory usage, program size, etc.)


History

One of the oldest contests known is the
International Collegiate Programming Contest The ICPC International Collegiate Programming Contest, known as the ICPC, is an annual multi-tiered competitive programming competition among the universities of the world. Directed by ICPC Executive Director and Baylor Professor Dr. William B. ...
(ICPC) which originated in the 1970s, and has grown to include 88 countries in its 2011 edition. From 1990 to 1994, Owen Astrachan, Vivek Khera and David Kotz ran one of the first distributed, internet-based programming contests inspired by the ICPC. Interest in competitive programming has grown extensively since 2000, and is strongly connected to the growth of the Internet, which facilitates holding international contests online, eliminating geographical problems.


Overview

The aim of competitive programming is to write
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the w ...
of computer programs which are able to solve given problems. A vast majority of problems appearing in programming contests are mathematical or logical in nature. Typical such tasks belong to one of the following categories: combinatorics,
number theory Number theory (or arithmetic or higher arithmetic in older usage) is a branch of pure mathematics devoted primarily to the study of the integers and integer-valued functions. German mathematician Carl Friedrich Gauss (1777–1855) said, "Mat ...
,
graph theory In mathematics, graph theory is the study of ''graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conn ...
, algorithmic game theory, computational geometry, string analysis and data structures. Problems related to
constraint programming Constraint programming (CP) is a paradigm for solving combinatorial problems that draws on a wide range of techniques from artificial intelligence, computer science, and operations research. In constraint programming, users declaratively state t ...
and
artificial intelligence Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech r ...
are also popular in certain competitions. Irrespective of the problem category, the process of solving a problem can be divided into two broad steps: constructing an efficient
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
, and implementing the algorithm in a suitable
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
(the set of programming languages allowed varies from contest to contest). These are the two most commonly tested skills in programming competitions. In most contests, the judging is done automatically by host machines, commonly known as judges. Every solution submitted by a contestant is run on the judge against a set of (usually secret) test cases. Normally, contest problems have an all-or-none marking system, meaning that a solution is "Accepted" only if it produces satisfactory results on all test cases run by the judge, and rejected otherwise. However, some contest problems may allow for partial scoring, depending on the number of test cases passed, the quality of the results, or some other specified criteria. Some other contests only require that the contestant submit the output corresponding to given input data, in which case the judge only has to analyze the submitted output data. Online judges are online environments in which testing takes place. Online judges have ranklists showing users with the biggest number of accepted solutions and/or shortest execution time for a particular problem.


Notable competitions

There are two types of competition formats: short-term and long-term. Each round of short-term competition lasts from 1 to 5 hours. Long-term competitions can last from a few days to a few months.


Short-term

*
International Collegiate Programming Contest The ICPC International Collegiate Programming Contest, known as the ICPC, is an annual multi-tiered competitive programming competition among the universities of the world. Directed by ICPC Executive Director and Baylor Professor Dr. William B. ...
(ICPC) – one of the oldest competitions, for students of universities in groups of 3 persons each *
International Olympiad in Informatics The International Olympiad in Informatics (IOI) is an annual competitive programming and one of the International Science Olympiads for secondary school students. It is the second largest science olympiad, after International Mathematical Olympi ...
(IOI) – one of the oldest competitions, for secondary school students * American Computer Science League (ACSL) – computer science competition with written and programming portions, for middle/high school students *
CodeChef Code-Chef is an online educational program and competitive programming community of global programmers. Code-Chef started as an educational initiative in 2009 by Directi, an Indian software company. In 2020, it became owned by Unacademy. Alon ...
– competition held from 2009, there are three contests held every month and an annual competition called CodeChef SnackDown *
Codeforces Codeforces is a website that hosts competitive programming contests. It is maintained by a group of competitive programmers from ITMO University led by Mikhail Mirzayanov. Since 2013, Codeforces claims to surpass Topcoder in terms of active co ...
Round – typically two hour contest, held every week *
Facebook Hacker Cup Facebook Hacker Cup (also known as the Meta Hacker Cup) is an annual international programming competition hosted and administered by Facebook. The competition began in 2011 as a means to identify top engineering talent for potential employment ...
– competition held from 2011, provided and sponsored by
Facebook Facebook is an online social media and social networking service owned by American company Meta Platforms. Founded in 2004 by Mark Zuckerberg with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin Mosk ...
*
HackerRank HackerRank is a technology company that focuses on competitive programming challenges for both consumers and businesses. Developers compete by writing programs according to provided specifications. HackerRank's programming challenges can be solv ...
– multiple competitions *
Gridwars Gridwars (aka GRID WARS) was a programming contest announced in November 2002 by Engineered Intelligence (EI). The competition was devised to promote EI's product called CxC (a parallel programming language) introduced the same day. Gridwars was ...
– four competitions held between 2003 and 2004. * Google Code Jam – competition held from 2003, provided and sponsored by
Google Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
* IEEEXtreme Programming Competition – annual competition for IEEE Student Members held since 2006 by
IEEE The Institute of Electrical and Electronics Engineers (IEEE) is a 501(c)(3) professional association for electronic engineering and electrical engineering (and associated disciplines) with its corporate office in New York City and its operat ...
. *
Topcoder Open Topcoder Open (TCO) is an annual design, software development, data science and competitive programming championship, organized by Topcoder, and hosted in different venues around US. In the first two years, 2001 and 2002, the tournament was titl ...
(TCO) – Algorithm competition held since 2001 by
Topcoder Topcoder (formerly TopCoder) is a crowdsourcing company with an open global community of designers, developers, data scientists, and competitive programmers. Topcoder pays community members for their work on the projects and sells community s ...

LeetCode Contests
- Weekly and Biweekly contests, 1.5 hours to solve 4 problems. In most of the above competitions, since the number of contestants is quite large, competitions are usually organized in several rounds. They usually require online participation in all rounds except the last, which requires onsite participation. A special exception to this is IEEEXtreme, which is a yearly 24-hour virtual programming competition. The top performers at IOI and ICPC receive gold, silver and bronze medals while in the other contests, cash prizes are awarded to the top finishers. Also hitting the top places in the score tables of such competitions may attract interest of recruiters from software and Internet companies.


Long-term

*
HackerRank HackerRank is a technology company that focuses on competitive programming challenges for both consumers and businesses. Developers compete by writing programs according to provided specifications. HackerRank's programming challenges can be solv ...
Week of Code *
ICFP Programming Contest The ICFP Programming Contest is an international programming competition held annually around June or July since 1998, with results announced at the International Conference on Functional Programming. Teams may be of any size and any programming la ...
– annual 3-day competition held since 1998 by the
International Conference on Functional Programming The ACM SIGPLAN International Conference on Functional Programming (ICFP) is an annual academic conference in the field of computer science sponsored by the ACM SIGPLAN, in association with IFIP Working Group 2.8 (Functional Programming). The con ...
* Topcoder Marathon Matches * Codechef Long Challenges - held every month - lasts up to 10 days


Artificial intelligence and machine learning

*
Kaggle Kaggle, a subsidiary of Google LLC, is an online community of data scientists and machine learning practitioners. Kaggle allows users to find and publish data sets, explore and build models in a web-based data-science environment, work with oth ...
– data science and machine learning competitions. * CodeCup – board game AI competition held annually since 2003. Game rules get published in September and the final tournament is held in January.Lasse Hakulinen
Survey on Informatics Competitions: Developing Tasks
– Olympiads in Informatics, 2011, Vol. 5, 12–25.
* Google AI Challenge – bi-annual competitions for students that ran 2009 to 2011. *
Halite Halite (), commonly known as rock salt, is a type of salt, the mineral (natural) form of sodium chloride ( Na Cl). Halite forms isometric crystals. The mineral is typically colorless or white, but may also be light blue, dark blue, purple, p ...
– An AI programming challenge sponsored by Two Sigma, Cornell Tech, and Google. * Russian AI Cup – open artificial intelligence programming contest. *
CodinGame CodinGame is a technology company editing an online platform for developers, allowing them to play with programming with increasingly difficult puzzles, to learn to code better with an online programming application supporting twenty-five programm ...
– hosts seasonal bot programming competitions.


Contests focusing on open source technologies

*List may be incomplete


Online contest and training resources

The programming community around the world has created and maintained several internet-resources dedicated to competitive programming. They offer standalone contests with or without minor prizes. Also the past archives of problems are a popular resource for training in competitive programming. There are several organizations who host programming competitions on a regular basis. These include:


Benefits and criticism

Participation in programming contests may increase student enthusiasm for
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includi ...
studies. The skills acquired in ICPC-like programming contests also improve career prospects, as they help to pass the "technical interviews", which often require candidates to solve complex programming and algorithmic problems on the spot. There has also been criticism of competitive programming, particularly from professional software developers. One critical point is that many fast-paced programming contests teach competitors bad programming habits and code style (like unnecessary use of macros, lack of OOP abstraction and comments, use of short variable names, etc.). Also, by offering only small algorithmic puzzles with relatively short solutions, programming contests like ICPC and IOI don't necessarily teach good software engineering skills and practices, as real software projects typically have many thousands of
lines of code Source lines of code (SLOC), also known as lines of code (LOC), is a software metric used to measure the size of a computer program by counting the number of lines in the text of the program's source code. SLOC is typically used to predict the am ...
and are developed by large teams over long periods of time.
Peter Norvig Peter Norvig (born December 14, 1956) is an American computer scientist and Distinguished Education Fellow at the Stanford Institute for Human-Centered AI. He previously served as a director of research and search quality at Google. Norvig is t ...
stated that based on the available data, being a winner of programming contests correlated negatively with a programmer's performance at their job at Google (even though contest winners had higher chances of getting hired). Norvig later stated that this correlation was observed on a small data set, but that it could not be confirmed after examining a larger data set Yet another sentiment is that rather than "wasting" their time on excessive competing by solving problems with known solutions, high-profile programmers should rather invest their time in solving real-world problems.


Literature

* Halim, S., Halim, F. (2013). ''Competitive Programming 3: The New Lower Bound of Programming Contests''. Lulu. * Laaksonen, A. (2017). ''Guide to Competitive Programming'' (Undergraduate Topics in Computer Science). Cham: Springer International Publishing.


See also

* Computer science competitions *
Code golf Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that solves a certain problem.Code Golf Stack ExchangeAbout code-golf Retrieved 2021-12-21. Code golf ch ...
* Hackathon


References

{{Reflist, refs=https://www.atlantis-press.com/proceedings/icaicte-13/8933


External links

;Open-source project for running contests
Contest Management System
Open-source tool in Python to run and manage a programming contest on a server IOI 2012 and IOI 2013. * Computer science competitions