Using the Judging Utilities

To install the utilities:
  1. Open a DOS window if you are not already in DOS.
  2. Change to a directory in which you have write access, under which you want the ACM99 directory and subdirectories copied.
  3. Put the judge's diskette in drive A: and type "A:\INSTALL".
This will create subdirectories ACM99, ACM99\TEAM, ACM99\JUDGE, and ACM99\BACK, and make the current directory ACM99\TEAM.  The necessary judging files are copied from the floppy disk.

Note that the supporting material:  the judge's solutions, judge's notes and the original problem files are left on the judge's floppy disk.

All directories mentioned below are relative to the ACM99 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:

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.1.8.  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 using a more recent Borland compiler, you will probably have to replace "tcc" with "bcc".  In case people are generating old segmented code for DOS, C++ and C files are compiled using the large memory model (that's the -ml option to tcc) because it most closely matches the Turbo Pascal memory model.  If you use a non-Borland compiler you will need to modify this flag as well.

Archive of submitted programs

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

If there is some problem detected that may affect earlier submissions, you will have a copy to consult!  (That is unless you are running on an old system with a virtual disk that is erased every time the system bombs! -- can't help there.)


Andy Harrington
Regional Chief Judge: Toolsmith
Loyola University Chicago