Judging for ACM Programming Contest
Lisong Xu (Based on Jeff's Link)
(Last Updated on October 31, 2011)
1. Installing Compilers on Your Laptop
In the ACM programming contest, a team may use any of the following
languages: Java, C, and C++. Accordingly, a judge should install the following
software on his/her laptop: Java Development Kit (version 6 and up), gcc
(version 3.4.4 and up), and g++(version 3.4.4 and up).
Note that, if you have multiple Java software installed on your laptop,
sometimes you may be confused with which one you are using. Therefore, I
strongly suggest you first uninstall all Java Development Kits (JDKs) and all
Java Runtime Environments (JREs) from your laptop, and then install the latest
Java SE Development Kit.
You may download and install the above compilers at the following sites.
Depending on the network and your machine speed, this may take one to two
hours. Thus, please do not wait until the last minute to install them!
Windows Machines:
- Java
SE Development Kit (JDK). Please download JDK, which includes java
compiler. Note that you should add the java bin directory (e.g.,
"C:\Program Files\Java\jdk1.6.0_22\bin") into your "PATH" variable, and add
the java lib directory (e.g., "C:\Program Files\Java\jdk1.6.0_22\lib") and
the current directory (i.e., ".") into your "CLASSPATH"
variable.
- gcc and g++ in
CodeBlocks. Please download codeblocks-10.05mingw-setup.exe, which
includes gcc and g++ compilers. Note that you should add the CodeBlocks bin
directory (e.g., "C:\Program Files\CodeBlocks\MinGW\bin") into your "PATH"
variable.
Linux Machines:
- Java
SE Development Kit (JDK)
- Usually, gcc/g++ have already been installed on your machine. Just make
sure to upgrade them to the latest version.
Mac Machines:
2. Installing PC2 on Your Laptop
PC2 is the
Programming Contest Control System developed at California State University,
Sacramento in support of Computer Programming Contest activities of the ACM.
- Download PC2 from here. (The latest
one is V9.1.6)
- Install PC2 by unzipping the PC2 distribution
(e.g., to "C:\"). Note that you should add the PC2 lib directory
(e.g., "C:\pc2-9.1.6\lib") into your "CLASSPATH" variable.
3. Configuring PC2 for Training
Now you are almost done! Just one more step to configure PC2, so that it
can connect to the training server.
- Open file "pc2v9.ini" in the PC2 root directory with a text
editor
- Change the server from "localhost:50002" to "129.93.230.81:22"
- Save it
- Finally, move this file from the PC2 root directory to the
PC2 bin directory!
4. On-Line Training for Judging
Type the following commands in the command line to make sure that you
have successfully installed everything:
- javac -version
- gcc -v
- g++ -v
Start PC2 Judge in the PC2 installation directory
- pc2judge.bat (for Windows)
- ./pc2judge (for Linux and Mac)
Type your assigned username and password. Now you should see a list of
12 "Unjudged Runs". All of them are collected by me from the previous local and
regional programming contests. If you see less than 12 "Unjudged Runs", send me
an email, and I will reset the training server.
Please judge each of them by
- Selecting one run and clicking button "Request Run"
- Clicking button "Execute Run"
- Waiting for the output, and then clicking button "Compare" to find out
whether the team's output is the same as the judge's answer.
- If so, select "Yes" from the list of "Select Judgement"
- Otherwise, select one of the following error types from the list of
"Select Judgement".
- No - Compilation Error: The
program will not compile. (Very rarely, since a team can find it easily
by themselves.)
- No - Run-time Error: During
execution, a run-time error occurred, such as divide by 0 and Java
exceptions. (Sometimes).
- No - Time-limit Exceeded: The
program takes longer than 2 minutes to execute. (Quite often for
complicated inputs).
- No - Wrong Answer: The
program generates incorrect answer to the question. (Most often).
- No - Output Format Error: The
output was not formatted according to specifications, only if the
problem specification explicitly requires some output format;
otherwise, we do not care about the output format. (Sometimes)
- No - Excessive Output: We do not use this one.
- In the contest, you should click button "Accept Selected" to complete
your judging. However, in this training, you just click button
"Close/Cancel" to cancel your judging so that other judges can still try
it.
Compare your judgment with the following correct judgment, if you have
any questions, please feel free to contact me.
| Team |
Problem |
Language |
Correct Judgment |
| team1 |
Babbage |
GNU C++ |
Yes |
| team2 |
Race (Requires 1-fractional digit output format) |
Java |
No - Output Format Error |
| team3 |
Buffet |
Java |
Yes |
| team4 |
Gates |
Java |
No - Time-limit Exceeded
|
| team5 |
Gates |
GNU C++ |
No - Wrong Answer |
| team6 |
Grace |
Java |
No - Run-time Error |
| team7 |
Jobs |
Java |
Yes |
| team8 |
Sum
|
Java |
No - Compilation Error
|
| team9 |
Touring |
Java |
Yes |
| team10 |
Touring |
GNU C++ |
Yes |
| team11 |
NBits |
GNU C++ |
No - Wrong Answer |
| team12 |
Walks |
GNU C |
Yes |
5. During the Actual ACM Programming Contest
- Before the contest, please change the server in pc2v9.ini to the contest
server in order to connect to the contest server not the training server.
- During the contest, please read the statement of each problem, and report
to the head judge immediately in the following cases:
- The problem statement is wrong.
- The problem statement is ambiguous.
- The judge answer is wrong.
- The judge answer is not unique.
- During the contest, please double check with other judges in the
following cases:
- There are multiple types of errors for a program, and you are not
sure which one to choose. In general, please select the first error
that you observed. But if a program has both "Wrong Answer" and "Output
Format Error", it is recommended to select "Wrong Answer".
- If you want to give "Compilation Error" or "Run-Time Error" for a
program, please ask another judge to try to compile and run it on a
different machine/operating system to check whether you still have the
same error.
- If you want to give "Output Format Error", please talk to other
judges to make sure that the problem statement explicitly requires the
output format.