Competitive programming

From Wikipedia, the free encyclopedia
  (Redirected from Online judge)
Jump to navigation Jump to search
Petr Mitrichev (left) and Gennady Korotkevich (right), two prominent competitive programmers during a contest.

Competitive programming is a mind sport usually held over the Internet 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[1][2] and Facebook.[3] There are several organizations who host programming competitions on a regular basis.

A programming competition generally involves the host presenting a set of logical or mathematical problems, also known as puzzles, to the contestants (who can vary in number from tens to several thousands), and contestants are required to write computer programs 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, program size, etc.)

History[edit]

One of the oldest contests known is 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 ICPC.[4]

Interest in competitive programming has grown extensively[quantify] since 2000, and is strongly connected to the growth of the Internet, which facilitates holding international contests online, eliminating geographical problems.

Overview[edit]

The aim of competitive programming is to write source code 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, graph theory, geometry, string analysis and data structures. Problems related to artificial intelligence 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, and implementing the algorithm in a suitable programming language (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.[5]

Notable competitions[edit]

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[edit]

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 ACM-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[edit]

Artificial intelligence and machine learning[edit]

  • Kaggle – 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.[12][13][14]
  • Google AI Challenge – bi-annual competitions for students that ran 2009 to 2011
  • Halite[15] – An AI programming challenge sponsored by Two Sigma, Cornell Tech,[16] and Google[17]
  • Russian AI Cup open artificial intelligence programming contest

Contests focusing on open source technologies[edit]

  • List may be incomplete
Contest Name Main Sponsor Description Running Since Usual Time Next Application Cycle Status
Multi-Agent Programming Contest Clausthal University of Technology in conjunction with agent-oriented workshops Annual international programming competition to stimulate research in the area of multi-agent system development and programming. 2005 Sept Sept 2011 Active
Google Summer of Code Google Inc. An annual program in which Google awards stipends to hundreds of students who successfully complete a requested free software / open-source coding project during the summer. 2005 Mar-Aug Mar 23- Apr 3 Active
Google Highly Open Participation Contest Google Inc. A contest run by Google in 2007-8 aimed at high school students. The contest is designed to encourage high school students to participate in open source projects. 2007 Nov-Feb Unknown Unknown

Online contest and training resources[edit]

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. These include:

Name Description Website
CodeChef[18][10] Maintained by Directi, it hosts a 10-day-long contest and a couple of short contests every month (one IOI styled and other ACM ICPC styled), and provides a contest hosting platform to educational institutions for free. The top two winners of the long contest win cash prizes while the top 10 global get a tee-shirt. www.codechef.com
CodeCup Annual international board game AI programming competition organized by the Dutch Olympiad in Informatics since 2003.[13][14] codecup.nl
Codeforces[19][18] Russian resource, maintained by ITMO University, which mostly provides frequent (up to two per week) short contests. Special features: ability to check correctness of other contestants' solutions during "hacking phase", virtual contests, trainings etc. codeforces.com
CodinGame Puzzles (increasing difficulty), code golf. Hosts regular online competitions (AI сhallenges, optimization problems). www.codingame.com
HackerEarth[18] Bangalore, India based company providing online contest like environment aiming at providing recruitment assessment solutions. www.hackerearth.com
HackerRank HackerRank offers programming problems in different domains of Computer Science. It also hosts annual Codesprints which help connect the coders and Silicon Valley startups. hackerrank.com
Project Euler[10] Large collection of computational math problems (i.e. not directly related to programming but often requiring programming skills for solving). projecteuler.net
Topcoder[19][18] US resource and company, which organizes contests and also provides industrial problems as a kind of free-lance job; it offers dozens of short contests and several long ("marathons") every year. Specific feature - participants have a chance to check correctness of other contestants' solutions after coding phase and before final automatic testing (so called "challenge phase"). www.topcoder.com
UVa Online Judge[19][18] Contains over 4,500 problems for practising. Hosts regular online competitions. Opened in 1995, it is one of the oldest such websites. onlinejudge.org
SPOJ[18] Polish online judge system which provides a lot of problems for training, and provides a platform for other organizers to host their programming contests. www.spoj.com
Open Kattis Public version of the Kattis contest management system, with an archive of over 2600 problems.[19] Kattis was developed to aid computer science courses, but it's also used to host prestigious competitions, like ICPC World Finals.[20] open.kattis.com
AtCoder Based in Japan, Atcode offers online programming contests on a weekly basis. The contests are offered in the Japanese and English language. atcoder.jp
Caribbean Online Judge Spanish resource, maintained by University of Information Science[21]. Contains over 3,000 problems for practicing. Also hosts regular online competitions. coj.uci.cu

Benefits and criticism[edit]

Participation in programming contests may increase student enthusiasm for computer science 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.[19]

There has also been criticism of competitive programming, particularly from professional software developers.[22] 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.).[23][22] 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 and are developed by large teams over long periods of time.[22] Peter Norvig stated that based on the available data, being a winner of programming contests correlated negatively with a programmer's performance at his or her job at Google (even though contest winners had higher chances of getting hired).[24]

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.[22]

Literature[edit]

  • 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[edit]

References[edit]

  1. ^ "Google Code Jam". google.com. Retrieved 2016-02-20.
  2. ^ "TCO12 Sponsor: Google - TCO 12". topcoder.com. Archived from the original on February 16, 2012.
  3. ^ "Facebook Hacker Cup". Facebook. Retrieved 2016-02-20.
  4. ^ Khera, Vivek; Astrachan, Owen; Kotz, David (1993). "The internet programming contest" (PDF). ACM SIGCSE Bulletin. 25 (1): 48–52. doi:10.1145/169073.169105. ISSN 0097-8418.
  5. ^ Programming Challenges (Skiena & Revilla) ISBN 0387001638, ISBN 978-0387001630
  6. ^ "CodeChef Monthly Contests".
  7. ^ "Programmers from all over the world compete at CodeChef SnackDown - ExchangeMedia".
  8. ^ "Codeforces contests". Retrieved 2018-10-12.
  9. ^ "Programming problems and Competitions :: HackerRank". HackerRank. Retrieved 2016-02-20.
  10. ^ a b c Combéfis, Sébastien; Wautelet, Jérémy (2014). "Programming Trainings and Informatics Teaching Through Online Contests" (PDF). Olympiads in Informatics. 8: 21–34.
  11. ^ "Programming problems and Competitions :: HackerRank". HackerRank. Retrieved 2016-02-20.
  12. ^ "CodeCup". www.codecup.nl.
  13. ^ a b Lasse Hakulinen. Survey on Informatics Competitions: Developing Tasks – Olympiads in Informatics, 2011, Vol. 5, 12–25.
  14. ^ a b Wevers, Lesley (2014). "Monte-Carlo Tree Search for Poly-Y" (PDF). University of Twente. Archived from the original (PDF) on 13 April 2017. Retrieved 16 September 2018.
  15. ^ "Halite Artificial Intelligence Programming Challenge". www.halite.io.
  16. ^ "Two Sigma Announces Public Launch of Halite". tech.cornell.edu.
  17. ^ "Halite helps students and developers compete to build better AI on Google Cloud Platform".
  18. ^ a b c d e f Luigi, William Di; Farina, Gabriele; Laura, Luigi; Nanni, Umberto; Temperini, Marco; Versari, Luca (2016). "oii-web: an Interactive Online Programming oii-web: an Interactive Online Programming Contest Training System" (PDF). Olympiads in Informatics. 10: 207–222.
  19. ^ a b c d e Bloomfield, Aaron; Sotomayor, Borja. "A Programming Contest Strategy Guide" (PDF). SIGCSE '16: Proceedings of the 47th ACM Technical Symposium on Computing Science Education.
  20. ^ Enström, E.; Kreitz, G.; Niemelä, F.; Söderman, P.; Kann, V. (2011). "Five years with Kattis – using an automated assessment system in teaching" (PDF). IEEE Frontiers in Education Conference.
  21. ^ "About | Caribbean Online Judge". coj.uci.cu. Retrieved 2020-06-18.
  22. ^ a b c d Smith, Duncan (December 2, 2015). "The Competitive Programming Debate".
  23. ^ Halim, Steven. "CS3233 - Competitive Programming". NUS School of Computing.
  24. ^ "Winning at programming competitions is a negative factor for being good on the job". April 5, 2015.

External links[edit]

Open-source project for running contests