Program Preparation

Programs may be written in C, C++, or Java. You may use any standard text editor to create text files that contain the source for your problem solutions.

There are slightly different instructions for preparing programs, depending on the language you choose.

Preparing C Programs

All file names must end with .c.

The compile command will run the GNU C compiler (version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)) and will provide access to the mathematical functions. It will attempt to create an executable form of your program. The syntax for the compile command is:

  compile problem_number source_files

where problem_number is the number of the problem for which this is a solution, and source_files are the files, or file, that contain the source code for your solution. For example, if the solution for problem number 1 is in file prob1.c only, to compile the solution you would type:

  compile 1 prob1.c

If the source files are valid, the compile command will create an executable named a.out.

To execute your program, after successful compilation type:

  a.out

You may invoke the compilers for your solutions without using the compile command; however, the judges will use the compile command to compile your solution.

Preparing C++ Programs

All file names must end with .cpp.

The compile command will run the GNU C++ compiler (version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)) and provide access to the standard template library. It will attempt to create an executable form of your program. The syntax for the compile command is shown below:

  compile problem_number source_files

where problem_number is the number of the problem for which this is a solution, and source_files are the files, or file, that contain the source code for your solution. For example, if the solution for problem number 1 is in file prob1.cpp only, to compile the solution you would type:

  compile 1 prob1.cpp

If the source files are valid, the compile command will create an executable named a.out.

To execute your program, after successful compilation type:

  a.out

You may invoke the compilers for your solutions without using the compile command; however, the judges will use the compile command to compile your solution.

Preparing Java Programs

All file names must end with .java. All outer classes must be in the default package, i.e., the package statement must not be used.

The first (or only) source file must contain a public class with the main method that runs your program. The compile command will run the Oracle Java compiler (version 1.6.0_22) and will attempt to create an executable form of your program. The syntax for the compile command is shown below:

  compile problem_number source_files

where problem_number is the number of the problem for which this is a solution, and source_files are the files, or file, that contain the source code for your solution. For example, if the solution for problem number 1 is in file prob1.java only, to compile the solution you would type:

  compile 1 prob1.java

If the source files are valid, the compile command will create (at least) a class file named main.class where main.java is the name of the first source file.

To execute Java programs, after successful compilation type:

  java main

where main.java is the name of the first source file; for the example above:

  java prob1

You may invoke the compilers for your solutions without using the compile command; however, the judges will use the compile command to compile your solution.

Submissions

Solutions are submitted for judging using the submit command as shown below:

  submit problem_number source_files

Note that the arguments are identical to the compile command described previously: problem_number is the number of the problem for which this is a solution, and source_files are the files, or file, that contain the source code for your solution.

For example, to submit the Java solution to problem number 1 shown in the example above, you would type:

  submit 1 prob1.java

After submitting a solution you should see a change in the scoreboard displayed on your workstation indicating the time that you submitted the solution. You cannot submit another solution to the same problem until the previous solution has been judged.

You will be notified via email whether or not your solution was correct. The table below shows the possible messages you will receive from the judges and what each message means.

Message Meaning
Problem N correct Your solution was correct.
Syntax Error Your solution did not compile -- this can already be detected by the compile command.
Run-time Error Your program crashed. Possible reasons could include; array out of bounds, null pointer, un-caught exception, etc.
Run-time Limit Exceeded Your program failed to terminate within two minutes of elapsed time.
Incorrect Output Your program executed but failed to generate the correct output.
Incorrect Output Format Your program executed and produced correct output, but the output does not match the format specified in the problem statement.
Incomplete Output Your program executed and produced correct output, but output is missing.

The judges will send you the first message that applies to your program. For example, if your output is incorrect and not properly formatted, you will only receive an Incorrect Output message from the judges.

Clarifications

Problem clarifications after the contest has begun are submitted to the judges using the following command:

  clarify problem_number

where problem_number is the problem number for which the clarification is sought.

After typing the clarify command, you will be prompted to enter your question. The question may consist of several lines. After entering your question type control-D (hold down the control key and press the D key) or a single period on a line by itself, to submit your question to the judges. A judge will respond to your question via email.

Note that your question, and the response from the judges, will be sent to all teams; watch your mailer's inbox for clarifications requested by other teams.

Printing

You may print text files using the standard Unix command for printing:

  lp source_files

where source_files are the text files you wish to print. Once your files have been printed they will be delivered to you at your workstation. You are not allowed to retrieve your documents yourself.

Resources

The only form of electronic resource that you will be allowed to use during the contest will be the documentation

Your account has been configured so that when you start Mozilla it will display the main index page for the Java API.

In accordance with the rules set forth by ACM no other electronic resources may be used during the contest. We will monitor network activity and any team caught violating these rules will be immediately disqualified.