Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Competitive programming

From Wikipedia, the free encyclopedia
Mind sport

Two men sitting at desks with a computer and papers sprawled on them.
Petr Mitrichev (left) andGennady Korotkevich (right), two prominent competitive programmers during the 2013Yandex algorithm cup

Competitive programming orsport programming is amind sport involving participants trying toprogram according to provided specifications. The contests are usually held over theInternet or alocal network. Competitive programming is recognized and supported by several multinational software and Internet companies, such asGoogle[1][2] andMeta.[3]

A programming competition generally involves the host presenting a set oflogical ormathematical problems, also known aspuzzles or challenges, to the contestants (who can vary in number from tens or even hundreds to several thousand). Contestants are required to writecomputer programs capable of solving these problems. Judging is based mostly upon number of problems solved and time spent on writing successful solutions, but may also include other factors (quality of output produced, execution time, memory usage, program size, etc.).

History

[edit]

One of the oldest contests known is theInternational Collegiate Programming Contest (ICPC) which originated in the 1970s[4] 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.[5]

Interest in competitive programming has grown extensively since 2000 to tens of thousands of participants (seeNotable competitions), 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 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,algorithmic game theory,computational geometry,string analysis,discrete mathematics anddata structures.[6] Problems related toconstraint programming andartificial 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 efficientalgorithm, and implementing the algorithm in a suitableprogramming 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 is 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 rank lists showing users with the biggest number of accepted solutions and/or shortest execution time for a particular problem.[7]

Notable competitions

[edit]

Algorithm competitions

[edit]
Name of the competition[8]OrganizersAudienceDescriptionNumber of participants
Google Code Jam (GCJ)GoogleopenAnnual competition organized and sponsored byGoogle from 2003 until its cancellation in 2023.[9]32,702 (2022)[10]
International Collegiate Programming Contest (ICPC)[11]ICPC Foundationuniversity studentsTeam competition for university students, the contest consists of many regional rounds that conclude in a world final organized yearly. Teams consist of three students from the same university and they are allowed to use only one computer.[12]50,000+ (2022)[13]
International Olympiad in Informatics (IOI)IOIPre-University StudentsInternational competition for secondary school students. Organized yearly since 1989. Each country can send at most 4 participants to compete.349 from 88 countries (2022)[14]
Meta Hacker Cup (formerlyFacebook Hacker Cup)Meta PlatformsopenAnnual competition held since 2011. Organized and sponsored byMeta (formerlyFacebook).27,604 (2022)[15]
Topcoder Open (TCO)TopcoderopenAnnual algorithm competition held from 2001 until its cancellation in 2023[16]

In most of the above competitions, competitions are usually organized in several rounds. They usually start with online rounds, which conclude in the onsite final round. The top performers at IOI and ICPC receive gold, silver and bronze medals. In the other contests, cash prizes are awarded to the top finishers. The competitions also attract the interest of recruiters from multiple software and Internet companies, which often reach out to competitors with potential job offers.

Artificial intelligence and machine learning

[edit]
  • List may be incomplete
NameMain OrganizersDescriptionStatus
KaggleGoogleData science, machine learning and mathematical optimization competition platform and online community.Active
AI ChallengeUniversity of WaterlooInternational artificial intelligence programming contest that ran from 2009 to 2011.Inactive
Halite AI Programming CompetitionTwo Sigma, Cornell TechComputer programming contest where participants build bots in desired programming language to compete on a two-dimensional battlefield.Unknown
Russian AI CupMail.Ru Group, My.comAnnual artificial intelligence programming contest.Unknown

Contests focusing on open-source technologies

[edit]
  • List may be incomplete
Contest NameMain SponsorDescriptionRunning SinceUsual TimeNext Application CycleStatus
Multi-Agent Programming ContestClausthal University of Technology in conjunction with agent-oriented workshopsAnnual international programming competition to stimulate research in the area ofmulti-agent system development andprogramming.2005SeptSept 2011Active
Google Summer of CodeGoogle Inc.An annual program in which Google awardsstipends to hundreds of students who successfully complete a requested free software/open-source coding project during the summer.2005Mar-AugMar 23- Apr 3Active
Google Highly Open Participation ContestGoogle 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.2007Nov-FebUnknownUnknown

Online platforms

[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. Users will typically be assigned a rating based on their performance on said contests. The archives of past problems are popular resources for training in competitive programming. There are several organizations that host programming competitions on a regular basis. These include:

NameDescription
Advent of CodeAn annual programming competition taking place duringAdvent, with a new pair of puzzles released each day, up to and including Christmas Day. The second problem of each day is locked until the completion of the first part, and usually follows on from it logically. There are both global and private leaderboards for each year, where rankings are based on who solves the problem first.
CodeChef[17][18]Maintained by Unacademy, it hosts a 3-day-long contest and a couple of short contests every month (one IOI styled called Lunchtime and another ICPC styled called Cook-Off), 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 t-shirt.
Codeforces[19][17]Russian platform, maintained byITMO University, which provides frequent (up to two per week) 2–3 hour contests (available in English and Russian). Users can also participate on contests published by other users on the "gym" section, submit additional test cases to "hack" submissions from other competitors during contests, write blogs to share techniques with one another and see the source code for the solutions from other users. Contestants that achieve a high enough rating may be granted additional features like being able to add tags to problems and propose problem sets to official contests.
CodinGamePuzzles (increasing difficulty),code golf. Hosts regular online competitions (coding games and programming challenges).
CodewarsA community-driven platform with inOnline integrated development environment where users solvekata—small coding challenges—in a wide variety of languages. Users earn ranks and honor as they complete challenges and create new ones. Emphasizes learning through practice and peer review, with solutions and discussions available after each challenge is completed.
HackerEarth[17]Bangalore,India based company providing an online contest like environment aiming at providing recruitment assessment solutions.
HackerRankHackerRank offers programming problems in different domains of Computer Science. It also hosts annual Codesprints which help connect the coders andSilicon Valley startups.
LeetCodeLeetCode has over 2,300 questions covering many different programming concepts and offers weekly and bi-weekly contests. The programming tasks are offered in English and Chinese.
Project Euler[18]Large collection ofcomputational math problems (i.e. not directly related to programming but often requiring programming skills for solving). Different from other online judges, source code is not necessary to submit solutions. Instead, each problem just requires a numerical answer (which is normally too large to guess or calculate by hand), allowing users to use any methods they see fit for solving the problems, including whether or not to choose a programming language.
SPOJ[17]Polishonline judge system which provides a lot of problems for training, and provides a platform for other organizers to host their programming contests.
Topcoder[19][17]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 the correctness of other contestants' solutions after the coding phase and before final automatic testing (so-called "challenge phase").
UVa Online Judge[19][17]Contains over 4,500 problems for practising. Hosts regular online competitions. Opened in 1995, it is one of the oldest such websites.

Benefits and criticism

[edit]

Participation in programming contests may increase student enthusiasm forcomputer 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][20]

There has also been criticism of competitive programming, particularly from professionalsoftware developers.[21] One critical point is that many fast-paced programming contests teach competitors bad programming habits and code style (like unnecessary use ofmacros, lack ofOOP abstraction and comments, use of short variable names, etc.).[22][21] Also, by offering only small algorithmic puzzles with relatively short solutions, programming contests like ICPC and IOI do not necessarily teach goodsoftware engineering skills and practices, as real software projects typically have many thousands oflines of code and are developed by large teams over long periods of time.[21]Peter Norvig 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).[23] Norvig later stated that this correlation was observed on a smalldata set, but that it could not be confirmed after examining a larger data set.[24][unreliable source?]

Another sentiment is that rather than spending time on excessive competing by solving problems with known solutions, high-profile programmers should instead invest their time in solving real-world problems.[21]

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.
  • Xu, X. (2020)The development, prosperity and decline of Olympic in Informatics. Publishedonline.
  • Kostka, B. (2021).Sports programming in practice. University of Wrocław.

See also

[edit]

References

[edit]
  1. ^"Google Code Jam".google.com. Archived fromthe original on May 31, 2023. RetrievedFebruary 20, 2016.
  2. ^"TCO12 Sponsor: Google - TCO 12".topcoder.com. Archived fromthe original on February 16, 2012.
  3. ^"Facebook Hacker Cup".Facebook. RetrievedFebruary 20, 2016.
  4. ^Li, Yujia; Choi, David; Chung, Junyoung; Kushman, Nate; Schrittwieser, Julian; Leblond, Rémi; Eccles, Tom; Keeling, James; Gimeno, Felix; Lago, Agustin Dal; Hubert, Thomas; Choy, Peter; d'Autume, Cyprien de Masson; Babuschkin, Igor; Chen, Xinyun (December 9, 2022). "Competition-Level Code Generation with AlphaCode".Science.378 (6624):1092–1097.arXiv:2203.07814.Bibcode:2022Sci...378.1092L.doi:10.1126/science.abq1158.ISSN 0036-8075.PMID 36480631.
  5. ^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. Archived fromthe original(PDF) on August 8, 2017. RetrievedMarch 10, 2020.
  6. ^Pak, Igor."Algorithms".Math 182. University of California, Los Angeles. RetrievedMarch 31, 2024.
  7. ^Programming Challenges (Skiena & Revilla)ISBN 0387001638,ISBN 978-0387001630
  8. ^Kostka, Bartosz (2021).Sports Programming in Practice(PDF). University of Wrocław.
  9. ^"Celebrate Google's Coding Competitions with a final round of programming fun".Google Developers Blog. Google. RetrievedFebruary 28, 2023.
  10. ^"Code Jam - Google's Coding Competitions".Coding Competitions. Archived fromthe original on June 27, 2023. RetrievedFebruary 26, 2023.
  11. ^"ICPC".icpc.global. RetrievedFebruary 26, 2023.
  12. ^"Programming Environment – ICPC Documents". RetrievedFebruary 15, 2024.
  13. ^"ICPC".icpc.global. RetrievedFebruary 26, 2023.
  14. ^"Olympiads".stats.ioinformatics.org. RetrievedFebruary 26, 2023.
  15. ^"Meta Hacker Cup - 2022 - Qualification Round".www.facebook.com. RetrievedFebruary 26, 2023.
  16. ^"FAQ - Topcoder Community Town Hall with Doug Hanson, Topcoder CEO".Topcoder. RetrievedFebruary 28, 2023.
  17. ^abcdefLuigi, 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.doi:10.15388/ioi.2016.13.S2CID 6877554.
  18. ^abCombéfis, Sébastien; Wautelet, Jérémy (2014)."Programming Trainings and Informatics Teaching Through Online Contests"(PDF).Olympiads in Informatics.8:21–34.
  19. ^abcdBloomfield, Aaron; Sotomayor, Borja."A Programming Contest Strategy Guide"(PDF).SIGCSE '16: Proceedings of the 47th ACM Technical Symposium on Computing Science Education.
  20. ^Jackson, Dean (December 1, 2013)."The Google Technical Interview. How to Get Your Dream Job"(PDF).XRDS: Crossroads, the ACM Magazine for Students.20 (2):12–14.doi:10.1145/2539270.S2CID 27549057.
  21. ^abcdSmith, Duncan (December 2, 2015)."The Competitive Programming Debate".
  22. ^Halim, Steven."CS3233 - Competitive Programming".NUS School of Computing.
  23. ^"Winning at programming competitions is a negative factor for being good on the job".YouTube. April 5, 2015.
  24. ^"HN discussion on correlation between job performance and competitive programming". December 2020.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Competitive_programming&oldid=1336769209"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp