nl en

Competitive Programming


Admission requirements

Recommended prior knowledge

Extensive knowledge and a keen interest in algorithms, data structures, and programming in C++ are highly recommended.
Registration with the lecturer is required given student capacity constraints (see below).


This course is intended for highly motivated students with a keen interest in algorithm development and programming in C++.
Knowledge of algorithms, data structures, and programming in C++ are a prerequisite.
The topic of competitive programming deals with the finer bits of programming that come to light when programming is done in a competitive context.
Aiming to fully optimize both time and memory usage, a combination of cleverly designed data structures and efficient routines can lead to the very best solution of a particular precisely defined problem.
Building on basic knowledge of elementary datastructures, sorting and search algorithms, we dive into the finer algorithmic aspects of graphs, trees, paths, circuits and flows and cover topics such as number theory , combinatorics, geometry and string algorithms.
All of this with the aim of building a set of knowledge and skills that will ultimately allow us to, in a competitive environment, solve a problem as efficiently and quickly as possible.

Course objectives

  • Learn how to quickly assess which algorithm is suitable for solving which type of problem;

  • Understand how to optimize, improve and streamline an algorithm in order to maximize its computational efficiency;

  • Be able to understand a complex solution to a problem, and explain its workings to others;

  • Learn how to work together in a small team to tackle a set of problems in as little time as possible;

  • Have the basic knowledge and skills to successfully participate in a programming contest.


The most recent timetable can be found at the Computer Science (MSc) student website.

You will find the timetables for all courses and degree programmes of Leiden University in the tool MyTimetable (login). Any teaching activities that you have sucessfully registered for in MyStudyMap will automatically be displayed in MyTimeTable. Any timetables that you add manually, will be saved and automatically displayed the next time you sign in.

MyTimetable allows you to integrate your timetable with your calendar apps such as Outlook, Google Calendar, Apple Calendar and other calendar apps on your smartphone. Any timetable changes will be automatically synced with your calendar. If you wish, you can also receive an email notification of the change. You can turn notifications on in ‘Settings’ (after login).

For more information, watch the video or go the the 'help-page' in MyTimetable. Please note: Joint Degree students Leiden/Delft have to merge their two different timetables into one. This video explains how to do this.

Mode of instruction

Lectures, lab sessions, assignments, contests and student presentations.

Total hours of study: 168 hrs. (= 6 EC)
Lectures: 28:00 hrs.
Assignments: 56:00 hrs.
Project (presenation, programming, paper): 84:00 hrs.

Assessment method

  • A presentation and short report on a paper (35%)

  • One individual assignment (20%)

  • Three evaluated rounds of programming contests (45%)

The teacher will inform the students how the inspection of and follow-up discussion of the exams will take place.

Reading list

  • Literature will be distributed during the course.


From the academic year 2022-2023 on every student has to register for courses with the new enrollment tool MyStudyMap. There are two registration periods per year: registration for the fall semester opens in July and registration for the spring semester opens in December. Please see this page for more information.

Please note that it is compulsory to both preregister and confirm your participation for every exam and retake. Not being registered for a course means that you are not allowed to participate in the final exam of the course. Confirming your exam participation is possible until ten days before the exam.

Extensive FAQ's on MyStudymap can be found here.


Lecturer: dr. F.W. Takes
Course website: Competitive Programming


This course has a maximum capacity of 15 students. Therefore, students should register for this course before January 5 by sending an e-mail to the lecturer. If more than 15 students apply, students will be informed of this by the lecturer and asked to provide a short statement on their background knowledge by January 12. Based on this, the lecturer will select 15 students to participate in the course by January 15.