Using the Judging Utilities

The installation and grading works exactly the same way as last year.  To install the utilities:
  1. If you are not already in DOS, open a Command Prompt (or MS-DOS Prompt).
  2. Change to a directory in which you have write access, under which you want the mcpc2002 directory and subdirectories copied.
  3. Put the judge's diskette in drive A: and type "A:\INSTALL".
This will copy the entire floppy disk, creating subdirectories mcpc2002, mcpc2002\TEAM, mcpc2002\JUDGE, mcpc2002\BACK, mcpc2002\NOTES, and directories with each of the individual problems, and make the current directory mcpc2002\TEAM.

All directories mentioned below are relative to the mcpc2002 directory.

To judge a program, make sure the current directory is still TEAM, and then just type
    J L #
where L is the problem letter, and # is the team number as in "j e 12" to grade problem e for team 12.

This batch file will

  1. search the A: drive for a valid source file for problem L,
  2. delete the relevant contents of TEAM in preparation for judging,
  3. copy the source file into TEAM,
  4. make a uniquely named archival copy of the source file in BACK,
  5. copy the correct input file into TEAM,
  6. compile the program,
  7. run the program,
  8. compare the program's output with the correct output, and if they don't match,
  9. allow you to visually compare the two output files.
Instructions will be displayed on the screen, and you can stop the batch file when necessary by pressing Ctrl-C.

In step 8 the files are compared using the diff utility. If the two files are identical it will say so, and otherwise it will show the differences.  The output of diff is fairly clear when it all fits on one screen.  If there are a lot of errors it may be easier to see them in step 9.

Step 9 is necessary if it is not obvious that there are wrong answers, and you need to check for a presentation error.  The batch file uses the LIST program to view both the team's output and the correct output.

Using the list program:

If you want to see both files at once using the LIST program: IMPORTANT NOTE:  SITE SPECIFIC MODIFICATIONS TO THE GRADING UTILITIES

These batch files assume that the following command-line compilers are in the executable path: "tpc" for Turbo Pascal 7.0, "tcc" for Turbo C++ 3.0, and "javac" for Java v1.2 or later.  It also uses "java" to execute Java programs.  If you are using different compilers you will need to change one of the five lines that immediately follow a comment of the form

rem IS THE FOLLOWING   ...   LINE RIGHT FOR YOUR SYSTEM?

in JUDGE\J2.BAT so that it runs the correct compiler and executes Java correctly. (If you are reading this before receiving your official packet in the mail, you can obtain last year's j2.bat from the judge's disk zip file at http://www.cs.smsu.edu/~rcjudge/2001/mcpc2001.zip.  If you modify the 2001 judge\j2.bat file, and it works, use it to replace judge\j2.bat on this year's disk.)

If you change any of these batch file lines, make sure the source file being compiled is %2.c, %2.cpp, %2.java or %2.pas.  The compiled file should be %2.exe or %2.class.

Visual C++ users:

In the j2.bat for this year the optional lines for Visual C++ are called from the batch file judge\vcpp.bat.  If your installation of the Visual C++ 6.0 portion of the Visual Studio was installed in the default location on drive C:, then vcpp.bat may work as written, using Visual C++ to compile a single C++ or C file.  For other versions or locations, edit vcpp.bat.  To make this file be used in j2.bat, edit j2.bat by moving two rem's so both tcc lines are not executed and the lines calling the vcpp batch file are executed.  (A "rem" at the start of a line keeps the line from being executed.)

Archive of submitted programs

Example:  The 4th time that team 7 has a C++ program for problem E graded on the same computer, the batch file JUDGE\NEXTBACK.BAT is called to copy their source program to
    BACK\7E4.CPP

Browsing in your spare time

All the judges' files are copied by install.bat.  While waiting for the next problem to grade, or even if you do not use the judging utilities at all, you can browse through the problem files and administrative information files by starting a web browser at the local file browse.html in the mcpc2002 directory.


Andy Harrington

Regional Chief Judge: Toolsmith
Loyola University Chicago

Last modified on October 25, 2002 at 4:20 PM.