CS 97SI: Introduction to Competitive Programming Contests

Course Information and Announcements

Lecture slides

  1. Introduction

  2. Mathematics

  3. Data Structures

  4. Dynamic Programming (DP)

  5. Combinatorial Games

  6. Basic Graph Algorithms

  7. Shortest Path Algorithms

  8. Network Flow Problems

  9. Computational Geometry

  10. String Algorithms (Additional material: Suffix Arrays - A Programming Contest Approach)

Assignments

To pass the course, you have to do either one of the following:

  1. Participate in 4 or more weekly practice contests.

  2. Solve a required number of Online Judge problems from the list below.

You can disregard the rest of this section if you decide to come to the practice contests.

All the problems below are from Peking Online Judge (POJ). Submissions should be made directly to the automated judging system.

Problems are classified into 10 different categories, and the lectures will cover essential algorithms and theoretical background for each particular category.

The numbers in parentheses represent the difficulty of the problems (0: easiest, 10: hardest). The difficulty rating is subjective; you might find a 5-rated problem easier than a 4-rated one. But do not attempt the challenge problems unless you are sure that you can solve all the easier ones. Note that you do not need to solve all the problems. You only need to solve at least 3 problems from at least 7 out of 10 categories, and 25 problems in total by the end of the quarter (March 23rd).

Common coding mistakes

for(i = 0; i < n; i++);
  some code
for(i = 0; i < 1000; i++)
  for(i = 0; i < 10; i++)
    some code
#define min(a, b) a<b?a:b // incorrect
#define min(a, b) (((a)<(b))?(a):(b)) // correct

If you get stuck…

Links