BAPC 2010
Benelux Algorithm Programming Contest 2010, Leiden

The contest

Every year, the universities and colleges organise programming contests for students. The participants of these contests cooperate in teams of three persons. Each team tries and solves as many problems as possible within 5 hours by writing computer programs.

The contests are split up into different rounds, spanning different geographical regions: first the local championships, then the Benelux Algorithm Programming Contest, followed by the North Western European Regional Contest, and finally the World Finals.

Participation in the Benelux Algorithm Programming Contest is possible for any student from any university from the Benelux. If you're interested in programming and algorithms, do participate!


Every year the ACM (Association for Computing Machinery) organises the international programming contests for students. Among these international contests are the 'regional' contests (the Benelux is in the North Western Europe region). The teams that perform best on these regional contests can participate in the World Finals, which are held on a different location each year. Every university can send a few teams to the regional contests.

Because there's much interest in these contests in the Benelux, qualifying rounds are held, where the best teams from several universities are selected. The best teams from all universities in the Benelux participate in the Benelux Algorithm Programming Contest. This contest is organized by a different university every year, usually a few weeks after the preliminary rounds. The results from the BAPC are usually used to decide which teams participate in the regional contest; usually, these are the best and second-best teams from a university.


The way a preliminary round is run is mostly the same as with the international contests. Participants are organized in teams of three persons. Six to ten problems are handed out at the start of the contest. The teams are supposed to create a program to solve these problems. The program reads the input from an input-file, finds the correct answer, and writes the result as output.

As soon as a team thinks the program is ready to solve the problem correctly, it can be sent to the jury over the network. They will test the program and tell the team whether it's correct or not. A bad program can be improved by the team and sent to the jury again. Programs are only judged on functionality. You can program as dirty as you like!

Every team can use one computer to implement and test the programs. Besides that, one can take along 30 A4-sized pages of documentation. Also, digital storage, calculators, laptops and the like are prohibited.


The participants have about five hours to solve as many problems as possible. The score is determined by the number of solved problems, without making a distinction between hard and easy problems.

Of course it's possible that multiple teams solve the same number of problems. In that case the time used to solve the problem breaks the tie. For every correctly solved problem the time from the start of the contest until the submission of the solution counts. The lower the total time, the better the score.


The problems are usually based on well-known classic algorithms, such as the shortest path algorithm of Dijkstra, or backtracking. Often a few mathematical problems are found.

To solve as many problems as possible it's very important to work together and divide the work. There's only one computer available, so you'll have to use it as efficiently as possible. A bit of programming experience, knowledge of algorithms or your team manual to find difficult things are always handy.