Q. What languages & platforms will be used for the contest?

C++, C, Java, and Python are supported. The machines in the lab are running RedHat Linux on an x86 platform.

Q. What do I submit?

A single source file which (if correct) solves the problem.

The source file name has very specific constraints:

Thus, a C++ submission for problem 3 should be named prob3.cc.

All programs should be command-line tools that produce no output to the screen. Instead, each program will accept a single command-line argument that identifies the name of the input file. This file will have an extension .dat. The program will produce an output file that has the same name as the input file but will use an extension of .out. Thus, if the program for problem 2 is given an input file with the name prob2.dat, it will produce an output file called prob2.out.

Q. How do we edit/compile/run our code?

The easiest editor is probably pico, which you can run by typing:

pico filename

at the command prompt. emacs and vi have (many) more features, but also have steeper learning curves.

To compile a C program:

gcc -g -o probN probN.c

To run a C program in the current directory:

./probN

To compile a C++ program:

g++ -g -o probN probN.cc

To run a C++ program in the current directory:

./probN

To compile a Java program:

javac -classpath . probN.java

To run a Java program in the current working directory:

java -classpath . probN

To run a Python program (there is no compilation step with Python) in the current working directory:

python probN.py

Q. How do we test our code?

Here's a checklist:

Q. How do we debug our code?

gdb is a command line debugger for C and C++ programs and jdb provides similar functionality for Java programs.

Q. How do we submit a problem?

Type the following command:

~kena/bin/acmsubmit filename

Thus, to submit a Java-based submission of problem 1, you would type:

~judge1/bin/acmsubmit prob1.java

Q. When we submit a problem, what should we expect back?

The time it takes to judge a problem depends on how busy the judges are and how hard it is to judge your specific submission. Once your submission is judged, your team should receive one of the following responses:

If the submission resulted neither in Presentation Error nor in Syntax Error, the judges will first attempt to run the submitted program on the sample input data provided in the problem statements, then on additional input data. Along with any error verdict consequent to running the program, the judges will indicate whether the verdict is based on a run using sample input data or additional input data. In the latter case, it can be assumed that the run on sample input data was successful.

Q. How do we clarify a problem?

Raise your hand and a judge will come talk to you.

Q. How is the contest scored?

Contestants are first ranked by number of correct solutions: the more problems completed, the higher the rank.

Contestants that have finished the same number of problems are then ranked by fewest penalty points: the fewer points, the higher the rank. The penalty points accrued is the sum of:

Example: The contest starts at 10:00 am; Team Zorbo turns in problem 1 correctly at 10:43, makes two incorrect submissions of problem 2 before submitting a correct solution at 12:35, and makes 3 incorrect submissions for problem 3 without ever turning in a correct solution. The Zorbos would have 225 penalty points, broken down in the following table:

Problem Submission Penalty Time Penalty Total
1 0*20 = 0 0:43 = 43 43
2 2*20 = 40 2:25 = 145 185
Total 2*20 = 40 3:08 = 188 225

Note that there is no penalty accrued for problem 3, since it was never submitted correctly.

Enjoy the contest!