Using Kattis’ Client

Create a Kattis Account

  1. Create an account on open.kattis.com. Choose Log in with e-mail, then choose Sign up for a Kattis account. Use your Bridgewater College email address when creating an account.

Getting the Kattis Client and Config File

  1. Log in to Kattis.
  2. Choose the Help tab, then choose the How to submit link located near the bottom of the page.
  3. Scroll down to the section titled Downloading a configuration file and client and download your personal configuration file and the kattis client.
  4. Open terminal or GitBash and change the working directory to the location of the files you downloaded (perhaps in your download directory). Then use the following command to copy the files to your VM.
scp -i <path to keypair file> <file to transfer> ec2-user@<ip address>:<file to transfer>

Setting Up Your VM

  1. SSH into your VM.
  2. Change the permissions of submit.py to 700.
  3. Create a directory named bin and move submit.py into bin.
  4. Verify that $HOME/bin is in your $PATH.
  5. Rename the kattis config file (e.g. kattisrc.txt) to .kattisrc.

Testing the Script

  1. Navigate to https://open.kattis.com/problems/hello.
  2. Create a program that solves the hello problem in a class named Hello.
  3. Submit your program to Kattis using the following command:
    1. submit.py -p hello -l Java -m Hello Hello.java
  4. Navigate to open.kattis.com with a browser and click on your name in the upper right corner to see if you submitted a correct solution.

© 2019 – 2020, Eric. All rights reserved.