The exercises and the exams of the course

Beyond the exercises of the book, the tests cover the material of the course on which the book is based: the chapter collections, the thematic collections, more than 80 exams from 2011 to 2026 with their official solutions, the exercise sessions and the laboratory projects. Each problem is implemented after its official solution and checked on the examples of its statement. It is also checked against an independent oracle (brute force, a simpler algorithm, the standard library) on random instances, which usually exposes the slips of the official solutions; there, the test implements the correct version and shows the counterexample. The tests are in test/exam_*.cpp, one program per theme (e.g., backtracking, dynamic programming, flows) or per source, and the name of a test gives the problem and the date of its exam.