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:
- Go to https://open.kattis.com/register.
- Enter your name, email and choose a password.
- Click on the Terms of Service check box (feel free to read them, there aren’t any surprises in them) and then click Submit.
- On the next page, fill in the information about location (country, state, university).
- At the bottom, click Update.
- 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:
- Go to https://open.kattis.com/login
- Click on Log in with e-mail.
- Enter your email address and the password you chose, then click Submit.
- In the Search Kattis box at the top, enter the problem name and press Enter.
- 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.
- Write a program that solves the problem!
- When you think you have a solution, click on the problem’s Submit link.
- Click and drag your program’s source file into the drag & drop area.
- Click on Submit.
- 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”.
- If your program is accepted, great! You’ve solved the problem. If it is not accepted, try again!