Skip to content

Category: Competitive Programming

My favorite bug

It was early November 2013, and me and a friend of mine, Helgi, were preparing to compete in our annual ACM-ICPC regional contest. We had been adding various algorithms and data structures to our code library, which we were allowed to bring with us to the contest. He had recently taken an Operating Systems course, where he had implemented a Skip list for use in a memory allocator. To my knowledge, Skip lists have not been used much in programming contests, but since it is a relatively simple (to code) data structure that supports the same operations as balanced binary search trees with the same (expected) time complexity, we thought it might be a good idea to add it to our library. (Note that C++, which was our programming language of choice, already provides a balanced binary search tree through its standard library, but it doesn’t support augmentation, which is something that is frequently needed in programming contests.)

T-414-ÁFLV: A Competitive Programming Course (2016 edition)

We will be holding our course about Competitive Programming for the second time during the three weeks from April 25th to May 13th. The format will be similar as before, but hopefully with a fresh set of problems.

Note: The course material is now accessible on Github. Contributions are welcome.
Warmup problems

We posted this optional set of problems as a warmup for those who were eager to get started.

Problems

Lecture 1: Introduction
Covers some basic things about the course, and then introduces competitive programming.

Material

Problems

Solve some of the following problems on Kattis. You need 5 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 2: Data structures and libraries

Reviews the most basic data types and data structures. Covers how to represent big integers, sets and graphs, and how to augment binary search trees.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 3: Data structures

Reviews the Union-Find disjoint sets data structure, and covers range queries, Square Root Decomposition and Segment Trees.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 4: Problem solving paradigms

Introduces problem solving paradigms, and covers complete search, backtracking, and divide & conquer. Covers binary search, and binary exponentiation.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 5: Greedy algorithms
Introduces greedy algorithms, and covers coin changing, interval scheduling, and scheduling to minimize lateness.

Material

  • Lecture slides: PDF

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Problem session 1

Teams of up to three students had to solve the following problems. They had three hours, and were only allowed to use a single computer.

Lecture 6: Dynamic programming

Introduces dynamic programming and goes over some examples.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 7: Unweighted graphs

Reviews basic graph theory. Covers depth-first search, breadth-first search, and applications.

Material

Problems

Solve some of the following problems on Kattis. You need 4 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 8: Graphs

Covers minimum spanning trees, shortest paths, some graph theory, and some special types of graphs.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 9: Mathematics

Covers some basic topics in mathematics, including number theory, combinatorics and game theory.

Material

Problems

Solve some of the following problems on Kattis. You need 4 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Problem session 2

Teams of up to three students had to solve the following problems. They had three hours, and were only allowed to use a single computer.

Lecture 10: Network flow

Covers maximum flow, minimum cut, bipartite matching, and other applications.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 11: Strings

Covers string matching, KMP, tries, suffix arrays, and applications.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 12: Geometry

Covers basic geometry, convex hulls, area of polygons, point in polygon, and closest pair of points.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Final exam

At the end of the course there was a four-hour individual final exam. It was as follows.

Part 1 (35%)

Solve one of the following problems.

Part 2 (15%)

Solve one of the following problems.

Part 3 (15%)

Solve one of the following problems.

Part 4 (15%)

Solve one of the following problems.

Part 5 (15%)

Solve one of the following problems.

Part 6 (15%)

Solve one of the following problems.

T-414-ÁFLV: A Competitive Programming Course

I held a course about Competitive Programming at Reykjavik University on the fall semester of 2014. It was three-week long with a fresh lecture and problem set each day. There were almost 90 students registered and it turned out to be a big success, although some students complained about heavy workload. For me it was a very rewarding experience.

Below you may find the lecture slides (including LaTeX sources), the problem sets, and other supporting material. All problems are available on the Open Kattis online judge.

Note: The course material is now accessible on Github. Contributions are welcome.
Lecture 1: Introduction

Covers some basic things about the course, and then introduces competitive programming.

Material

Problems

Solve some of the following problems on Kattis. You need 5 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 2: Data structures and libraries

Reviews the most basic data types and data structures. Covers how to represent big integers, sets and graphs, and how to augment binary search trees.

Material

Problems

Solve some of the following problems on Kattis. You need 5 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 3: Data structures

Reviews the Union-Find disjoint sets data structure, and covers range queries and Segment Trees.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 4: Problem solving paradigms

Introduces problem solving paradigms, and covers complete search, backtracking, and divide & conquer. Covers binary search, and binary exponentiation.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 5: Greedy algorithms

Introduces greedy algorithms, and covers coin changing, interval scheduling, and scheduling to minimize lateness.

Material

  • Lecture slides: PDF

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Problem session 1

Teams of up to three students had to solve the following problems. They had three hours, and were only allowed to use a single computer.

Lecture 6: Dynamic programming

Introduces dynamic programming and goes over some examples.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 7: Mathematics

Covers some basic topics in mathematics, including number theory, combinatorics and game theory.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 8: Unweighted graphs

Reviews basic graph theory. Covers depth-first search, breadth-first search, and applications.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 9: Graphs

Covers minimum spanning trees, shortest paths, some graph theory, and some special types of graphs.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 10: Network flow

Covers maximum flow, minimum cut, bipartite matching, and other applications.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Problem session 2

Teams of up to three students had to solve the following problems. They had three hours, and were only allowed to use a single computer.

Lecture 11: Strings

Covers string matching, KMP, tries, suffix arrays, and applications.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Lecture 12: Geometry

Covers basic geometry, convex hulls, area of polygons, point in polygon, and closest pair of points.

Material

Problems

Solve some of the following problems on Kattis. You need 3 points to get full score.

Bonus problems

If you want a challenge, you can try solving the following bonus problems.

Final exam

At the end of the course there was a four-hour individual final exam. It was as follows.

Part 1 (30%)

Solve one of the following problems.

Part 2 (20%)

Solve one of the following problems.

Part 3 (20%)

Solve one of the following problems.

Part 4 (20%)

Solve one of the following problems.

Part 5 (20%)

Solve one of the following problems.

Part 6 (20%) (Bonus)

Solve one of the following problems.