Programming Practice via Competitive Programming

There are several sites that offer opportunities to practice and compete via competitive programming.

Kattis is a site that hosts a repository of over 2,500 contest problems, ranging in difficulty from writing “Hello, world” to problems that challenge the best programmers in the world. A large number of problems in their repository are ones that you can solve with the skills you learn in our programming courses.

Creating a Kattis Account

To start, you will need to register for a Kattis account. It’s free and easy to set up. Here are the steps:

  1. Go to
  2. Enter your name, email and choose a password.
  3. Click on the Terms of Service check box (feel free to read them, there aren’t any surprises in them) and then click Submit.
  4. On the next page, fill in the information about location (country, state, university).
  5. At the bottom, click Update.
  6. In the top-right corner, click on the triangle and choose Log out.

That’s it, you’re all set to go.

Using Kattis

On Blackboard, I’ll post some problems from the Kattis archive that should be solvable given the material from each of the chapters, as appropriate.

If you wish to try your hand at one or more of these, do the following:

  1. Go to
  2. Click on Log in with e-mail.
  3. Enter your email address and the password you chose, then click Submit.
  4. In the Search Kattis box at the top, enter the problem name and press Enter.
  5. The problem statement is displayed. A problem statement consists of a description of the problem, the format of the input, the format of the expected output and at least one example.
  6. Write a program that solves the problem!
  7. When you think you have a solution, click on the problem’s Submit link.
  8. Click and drag your program’s source file into the drag & drop area.
  9. Click on Submit.
  10. The page will show you the judging process as it proceeds. The Kattis judge will compile and run your program on several test data sets. If your program gives the correct output on all sets, the judge will end with an “Accepted” judgment. Otherwise, the judge will tell you about the first issue it sees, most likely “Wrong Answer” or “Compile Error”.
  11. If your program is accepted, great! You’ve solved the problem. If it is not accepted, try again!