These are the sample solutions, test inputs and test outputs used for the
1998 East Central North America regional contest of the ACM International
Collegiate Programming Contest.  Please see

  http://plg.uwaterloo.ca/~acm00/regionals/

for the problem set, contact information, standings and so forth.


The judges and Dr. Bonomo (collectively or individually, as appropriate)
hold copyright on the solutions and test data.  If you distribute them,
you must do so with this README file.  If you make altered versions of
th files available to others, then you must clearly indicate the changes
that you have made in addition to observering any restrictions on the
original files.  You may use this data set for educational purposes,
personal edification and running practice contests.  If you find a
commercial application for these files then you will need to contact the
authors before making use of them in that way.


To be considered correct, the following (Unix) command-line should
produce no output for each test case:

  ./my-pX < X.N.dat | diff - X.N.diff

In the case of problem E, you should use

  ./my-pE < E.N.dat > tmp_file ; ./E.N.cmd tmp_file

after building E-judge for E-judge.c.

Additionally, the programs must run in 16MB of RAM and 5s of CPU time on
the particular sort of Sparc Ultra/4 that we were using and not generate
any runtime errors.  I understand that

  char x[10];
  for( i=0 ; i < 10 ; i++ ) scanf( "%d", x+i );

appears to work on Intel processors running certain operating systems.
On the machine used this would generate a bus error due to using an
unaligned pointer to an integer quantity.  (Moreover, this code could
get the wrong answer or generate a segmentation fault on some machines
that don't get bus errors, depending on how memory is arranged.)

Differences in malloc() implementations will give greatly different
results with incorrect programs.

If you solved a problem in Pascal ... different Pascal implementations
vary wildly.  For that matter, so do C++ implementations.  We used
gcc/g++ 2.8.1 with -ansi and -O2 flags.

Programs were compiled and run in the contest environment exactly as
they were in the judging environment, and run with the same limitations.
(An advantage of using a restricted environment.)

Some of the judge's solutions were not built in the contest environment.
In particular, one judge likes to write in Perl....  They were not
tested on every platform in existence, so they might conceivably rely on
platform-dependent issues (such as mentioned above) to function correctly.

Derek Kisman wrote solutions to all problems except G in the contest
environment.  (There was a different problem G at the time.)  Since he
was working in contest conditions, his solutions should be exempt from
scrutiny.

The solutions were created before the problem details were finalized, so
some may show rudiments of earlier requirements.  Modifying the programs
to work with changed specifications was not always done with grace.
