Q. How many teams can be from one institution?
Q. How many people can be on a team?
Exactly three (only a subset might actually appear at the contest) and one substitute. At most one can have completed a Baccalaureate degree, but cannot have two years or more of gradate studies or a graduate degree.
Q. What languages & platforms will be used for the contest?
Site specific, but C++, C, and Java will be supported. Expect to use Unix (usually Solaris or Linux) workstations.
Q. What can we bring?
Books, printouts, scratch paper. Basically, nothing electronic, or electronically readable media. This includes pocket calculators and PDA's
Q. What do you provide?
Site specific, but your team will have a single workstation, be fed, and have access to a classroom (or part of one) or similar place to work in relative privacy.
Q. What problems should we do first?
Since the time penalty for each correct problem is from the start of the contest, you should get the easiest problems done first. Note that determining which problems are easy is part of the contest! Seeing how other teams are progressing on the problems can help your team determine this.
Q. What do we submit?
A single source file which (if correct) solves the problem. The source file name has very specific constraints:
C and C++ programs must be console applications where execution begins from the main function with the prototype
Java programs must be console applictations where execution begins from the main method in the Main class. The source file should declare no public outer classes (which would otherwise restrict the possible name of the source file) and be defined in the default (no-name) package.
Here is a Java template.
Note that there is a team/problem specific header and trailer line which is required in the output file for each problem. The header is
Q. How do we edit/compile/run our code?
Again site specific. Assuming you are using a unix-like operating system the least-common-denominator editor is probably pico, which you can run by typing
To compile a C program:
To run a C program in the current working directory:
To compile a C++ program:
To run a C++ program in the current working directory:
To compile a Java program:
To run a Java program in the current working directory:
Q. How do we test our code?
Here's a test checklist:
Note that some problems are nondeterministic, in that they allow for more than one correct answer for a given input. diff is inadequate for determining the correctness of such programs. The judges, of course, will not use diff to determine the correctness of such problems.
Unix is case sensitive and our convention is to only use
lower case for the names of input and output files. Here are three
language-specific ways to open the input and output files:
Language | File | I/O | Code |
Java | prob1.dat | Input | BufferedReader in=new BufferedReader(new FileReader("prob1.dat")); |
Java | prob1.out | Output | PrintWriter out=new PrintWriter(new BufferedWriter(new FileWriter("prob1.out"))); |
C | prob1.dat | Input | FILE *in=fopen("prob1.dat","r"); |
C | prob1.out | Output | FILE *out=fopen("prob1.out","w"); |
C++ | prob1.dat | Input | ifstream in("prob1.dat"); |
C++ | prob1.out | Output | ofstream out("prob1.out"); |
Q. How do we debug our code?
More site specific. gdb is the command line debugger for C and C++ programs, and you might have ddd, which is a gui-interface for this. Read the banners and h is for help. Ask about Java; but don't expect much. Think print statements.
Q. How do we submit a problem?
Site specific. If your site is using centralized judging, point a browser to https://acm.mesastate.edu/~acm/submit.html and fill in the form. The password is a 7-digit phone number-like code. You cannot change this password for the duration of the contest.
Q. When we submit a problem, what should we expect back?
An exceedingly unlikely presentation error would be to present a source file which is too large: each source file is limited to 100KB.
The judges will only compile using non-optimized and debugging options, and only link against the standard libraries, along with the math libraries (-lm). Don't expect more than that when your program is built to run against the judge data. Warnings generated by the compiler are ignored.
Note that, by ignoring warnings, what might be flagged as a compile-time error may produce a run-time error instead.
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?
Site specific. If your site is using centralized judging, point a browser to https://acm.mesastate.edu/~acm/clarify.html and fill in the form. The password is a 7-digit phone number-like code (the same one used for submitting a program). You cannot change this password for the duration of the contest.
All substantial clarifications (i.e., not "please reread the problem") are posted to all teams. Check for clarifications on the problems!
Q. How are teams ranked?
Teams are first ranked by number of correct solutions: the more problems which are finished by a team, the higher the rank.
Teams 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 for your team 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