USACO Winter Championship

Wed-Mon, January 15-20, 1997

Results Report


Introduction

                       
WHAT:   The USA Computer Olympiad Winter Championship is a computer programming
        contest open to all pre-college students on the hs-computing@delos.com
        mailing list.  Four or five problems are presented for solution.

WHO:    All pre-college students who are members of the hs-computing mailing
        list are eligible.  This is an individual contest, not a team contest.

WHEN:   Problems will be posted to the mailing list between 0750 and 0800
        a.m. US Mountain Standard Time (1450-1500 GMT) on Wednesday, January
        15, 1997.  All results are due by 0800 am US Mountain Standard Time
        (1500 GMT) Monday, January 20, 1997.  Late solutions will not be
        accepted.

        The extended solution interval is required this time since several
        schools are conducting final examinations this week.

WHERE:  Students can work on problem solutions anywhere they wish, including
        school and home.

HOW:    Problems and rules will be posted to the hs-computing mailing list.
        Solutions must be written in Borland C/C++ or Turbo Pascal and must
        be returned via e-mail by the contest completion deadline along with
        answers to test data supplied with the problems.  Choosing a different
        compiler than the Borland compilers will probably cause a solution
        to compile incorrectly on the Borland compilers on the judges' machines
        (which will result in no points scored for that problem).

PRIZES: Winners will receive a handsome plaque, have their names immortalized
        on the USACO Web Pages, and be the subject of a press release.

FEES:   No entry fees are charged.

RULES:  * No consultation with people is allowed.
        * Submit questions to kolstad@bsdi.com who will try to fathom
          an appropriate answer for you (and post it to the hs-computing
          list, if appropriate).
        * Any amount of consultation with written materials (such as
          programming books) is allowed (but this doesn't mean you can ask
          someone to write an article on how to solve a problem, of course).
        * Spend no more than six hours solving problems.
        * Spend no more than three sessions solving problems (i.e., don't work
          one hour in a session, take a one hour break, work another hour,
          take another break, ...).
        * Submit source code for the problems and answers to the test data
          to the contest coordinators via e-mail to win97@delos.com (see
          below).
        * Solutions will be judged for correctness by running them against
          several (usually 10) different sets of data.  Points are accrued
          for correct solutions.  Some datasets for a problem will be worth
          more points than others.  Solutions to some problems will be worth
          more points.  Judging will be performed expeditiously but
          could easily take more than one week to complete.
        * Unless otherwise stated, no one solution can run longer than 10
          seconds on the judge's computer (a medium speed Pentium).
        * Judges will not test all datasets against a program that crashes
          the computer for initial datasets.
        * Judges will not test all datasets against a program whose author
          submits erroneous solutions for the supplied test data.
        * Make sure your program has any special compiler options
          listed near its first line so the graders can get them right.
        * Decision of the judges is final.
        * Do not cheat; it's no fun for anyone.
        * Do not use inline assembler statements.
        * Don't submit programs that use data files that aren't supplied by
          the contest coordinators
        * Keep in mind that this is neither a `tricky input' nor a
          `tricky output' contest, in general.
        * All problems are intended to be straightforward; no problems
          are intended to have `tricks' in them.
        * If you find a problem with wording or an ambiguity, document your
          assumptions carefully and move on.  Send e-mail; we'll reply if we
          can.

NOTES:  * We will mostly be using automated grading procedures.
        * The registration information at the front of the solution
          should be in precisely the same format as requested below.
        * Submitters of programs that attempt to thwart grading procedures
          will be forever disqualified from USACO contests.
        * Rob Kolstad is this contest's director.
        * During the contest, feel free to send questions (one per e-mail
          please!) to kolstad@bsdi.com.  He will reply by e-mail when he is
          available.  Questions judged to be germane to the entire hs-computing
          list will be summarized and posted there, also.  Be sure to check
          your e-mail occasionally for contest updates, should there be any.
          For fairness, sometimes your question will be answered with a null
          answer (`sorry, I can't elaborate on that').
        * Rob Kolstad judges Russ Cox's programs (at kolstad's site) before
          any other program is judged.
        * All programs read their input from file INPUT.DAT.
        * All programs write their output to the console.
        * DO NOT USE conio.h or its Pascal equivalent -- just write your
          answer straight to the console as if it were a teletype-style
          printer (using no screen manipulation or cursor positioning
          commands).

ACKNOWLEDGMENTS:
         * Thanks to Hal Burch for problem and solution creation and testing.
         * Thanks to Don Piele for problem selection and creation.
         * Thanks in advance to Russ Cox for creating grading procedures and
           performing them for the contest entrants.

----------------------------------------------------------------------
No special registration form is required.  Each problem solution has,
within it, an entry form to be completed (see below).
----------------------------------------------------------------------

Submit your answers to problems via e-mail to win97@delos.com.  Please send
precisely one problem's solution (and test results) per e-mail (i.e., send
three separate e-mails for three problems, etc.).  Submit only one solution
per problem.  If you submit more than one solution, only the last one received
will be graded.  Every e-mail is acknowledged almost instantly by an automated
mail reader.  If you do not receive an acknowledgment, double-check the
address.  Note that some networks connect to the Internet only occasionally.

Each solution e-mail submission should have the following format for the
e-mail message.  PLEASE SEND ASCII MESSAGES.  DO NOT USE ATTACHMENTS, MIME
ENCODING, fancy mail options, or anything else.  The programs that read the
mail are looking for just plain old ASCII.

The submissions have special comments separating sections of the mail.  These
begin with three `#'s and are followed by an informational comment.  Those
comment lines are surrounded by a single blank line.  Here is the format for
submitting solutions so the grading programs can read them:

### Program

... [text of program in C or pascal; see below for header format] ...

### Test Data 1

... [output of program for first run of test data] ...

### Test Data 2

... [output of program for second run of test data] ...

### Test Data 3

... [output of program for third run of test data] ...

### Test Data 4

... [output of program for fourth run of test data] ...

### Test Data 5

... [output of program for fifth run of test data] ...

### End

NOTES:  * Put comments precisely like these at top of each solution.
        * These are read by a program, do not change the format.
        * Be sure your email address and name are always spelled precisely
          the same way.  We use the combination of email address and name as
          a unique identifier for you.
        * Data after `### End' is ignored (e.g., signatures)

Here is the C/C++ header filled out for Rob Kolstad (my comments on far
right). You should fill yours out for each problem with your own data (why
not save it in a file on your computer for easy inclusion on later
submissions):

/*

Compiler options:                 (any special options needed)

Problem: 1                        (single digit problem number)
Name: Rob Kolstad                 (first name then last name)
Email: kolstad@bsdi.com           (email address)
School: Norman High School
Grade: 12                         (grade in school, numerical: 7, 8, 9, ...,
13)
Age: 18
Country: USA                      (three letters: CAN, COL, DEU, ROM, USA,
etc.)

*/

Pascal users substitute { for /* and } for */.

Here's a clarification for screen I/O.  Don't even clear the screen.

        * DO NOT USE conio.h (in C) or `uses dos;' in Pascal -- just write
          your answer straight to the console as if it were a teletype-style
          printer (using no screen manipulation or cursor positioning
          commands).

Here's a hint about testing your program:

        * Note that test data run by the judges will almost surely be
          more challenging than the test data supplied wit