2. Problem setup
2.1. Competitive programming
Programming competitions ﬁrst began in the 1970s and have since grown in popularity to include
hundreds of thousands of participants worldwide. The annual International Collegiate Programming
Contest attracts almost 60,000 students from over 3,000 universities (ICPC Factsheet, 2020), and
companies including Google (Google Code Jam, 2021) and Facebook (Facebook Hacker Cup, 2021)
hold regular competitions. The popular Codeforces platform, used throughout this paper, has more
than 500,000 active users and holds weekly competitions with tens of thousands of participants (Mirza-
yanov, 2020).
The exact format of a programming competition varies between contests, but in general individuals or
teams of competitors are given between 5 and 10 problem descriptions (Figure 2), and approximately
3 hours to write programs (Figure 3) to correctly solve as many problems as possible. The program
alphacode