Using the Judging Utilities Last modified Tue Oct 25 22:32:10 2011

The installation and grading work exactly the same way as last year by default. To install the utilities in Windows:

  1. Open a Command Prompt (usually under Start->All Programs->Accessories).
  2. Change to a directory in which you have write access, under which you want the mcpc2011 directory and subdirectories copied.
  3. Put the judges' CD-ROM into a CD/DVD drive. Then enter the command "e:\install", where "e:" should be replaced by the correct drive letter for your CD/DVD drive.

This will copy the subdirectory mcpc2011, and subdirectories mcpc2011\team, mcpc2011\judge, mcpc2011\back, mcpc2011\notes, and directories with each of the individual problems, and make the current directory mcpc2011\team.

All directories mentioned below are relative to the mcpc2011 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 script file as written will

  1. search the a: drive for a valid source file for problem L, (see below to change a: to another drive)
  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. visually compare the two output files if they are different.

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 fc. If the two files are identical it will say so, and otherwise it will show the differences. The output of fc 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 starts in a popup KDiff3 window automatically if the files are not exactly alike. This may be unnecessary if it is clear from the fc output that there is a wrong answer. KDiff3 has several useful features for evaluating errors:

Determine whether any difference is a wrong answer or if all errors are presentation errors.

IMPORTANT NOTE: Site-Specific Modifications to the Grading Utilities

These batch files assume that g++ and gcc and Oracle/Sun's version 1.6 or greater of java.exe and javac.exe are in the execution path. If you have an IDE that adds additional flags when it invokes g++, gcc or javac, make sure you alter j2.cmd to match. If you have a modified j2.cmd from 2006 and your site configuration has not changed, you should be able to use it this year, but test it to be sure.

To allow problem submissions to arrive on a flash drive or any media not read through drive a:, the script j1.cmd has a line right near the top setting the environment variable MCPCdrive. If you want a drive other than a: used, change it.

Testing Scripts Ahead of Time

The scripts will arrive with your official packet in the week of the competition, but if you are planning to use them or variants of them, you are strongly encouraged to test early for this year's setup. You can obtain a test setup in utilTest2010.zip. That zip also contains benchmarking programs to evaluate the efficiency of the computing systems used throughout the region.

Testing Judge's Solutions on the Day of the Competition

There is a directory mcpc2011/solDir containing a copy of all the solutions.  For easy testing of correct solutions with the judging utilites, just copy the contents to a flash drive.  Note the times for execution on your system.  They should all be substantially less than a minute.

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.cmd is called to copy their source program to back\7e4.cpp.

Browsing in your spare time

All the judges' files are copied by install.cmd. While waiting for the next problem to grade, you can browse through the problem files and administrative information files by starting a web browser at the local file browse.html in the mcpc2011 directory.