Contents
Create a Kattis Account
- 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
- Log into open.kattis.com.
- Choose the Help tab, then choose the How to submit link located near the bottom of the page.
- Read the How to submit page carefully before continuing.
- Scroll down to the section titled Downloading a configuration file and client.
- Cut and paste the contents of your personal configuration file into a new file on your laptop and save the file in your Downloads directory as kattisrc.txt.
- Download the Kattis client into your Downloads directory by clicking on the file name.
- Open terminal or GitBash and change the working directory to the location of the files you downloaded (in your Download directory).
- Use the following command to copy your personal configuration file and submit.py to your home directory on cs.bridgewater.edu.
scp <file name to transfer> <bc_username>@cs.bridgewater.edu:<file name to transfer>
Note that when typing the above command you need to replace <file name to transfer> and <bc_username> with appropriate information.
Setting Up Submit.py
- SSH into cs.bridgewater.edu
- Run chmod 700 submit.py.
- Create a subdirectory in your home directory named bin and move submit.py into bin.
Setting up .kattisrc
- Rename the kattis config file (e.g. kattisrc.txt) to .kattisrc.
Testing the Script
- Navigate to https://open.kattis.com/problems/hello with a browser to view the hello problem.
- Write a program that solves the hello problem with a class named Hello in a file named Hello.java.
- Submit your program to Kattis using the following command:
submit.py -p hello -l Java -m Hello Hello.java
- Navigate to open.kattis.com with a browser and click on your name in the upper right corner to see if your solution was accepted.
© 2020 – 2022, Eric. All rights reserved.