The USA Computer Olympiad Fall
2000 Contest is a computer programming contest open to all pre-college
students throughout the world who have access to the firstname.lastname@example.org
mailing list. Several problems are presented for solution.
Results of this contest and other contests will be among the data used to
choose delegates to the USA training camp and potentially to the IOI.
Winners of both the domestic and international divisions will receive
awards at the end of the season.
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. Choosing a non-Borland Pascal
compiler will potentially cause a solution to not compile on the judges' machines. After
you have completed the contest, feel free to take your final solution to a Borland Pascal
equipped machine to ensure it will work. Do not charge this `repair' time against your
coding time limit. Choosing a non-Borland C/C++ compiler has a greater chance of working
out okay: make sure you use no library functions other than those provided by the
following header files (i.e., don't #include anything but these files -- not all of which
are usually needed, of course): assert.h io.h mem.h string.h ctype.h iostream.h stdio.h
values.h fstream.h math.h stdlib.h If you use an ANSI compiler and use (at most) only
these headers, your program should compile fine under our compilers. Remember that we are
running the judging under MS-DOS and are thus subject to its memory requirements. The
specific compilers used are as follows.
All pre-college students who have access to the hs-computing mailing list
are eligible. This is an individual contest, not a team contest.
WHERE: Students can work on problem solutions anywhere they wish, including school and home.
for the international division will be posted to the mailing list between
during the morning US Mountain Standard Time (0730-0800 or so) on Tuesday,
November 16, 1999. All results are due by 0800 am US Mountain Standard Time
(1400? GMT) Tuesday, November 23, 1999. Late solutions will not be accepted.
PRIZES: Winners will receive a handsome plaque or certificate and have their names immortalized on the USACO Web Pages
FEES: No entry fees are charged.
No special registration form is required. Each problem solution has, withinits submission, an entry form (see below). You enter when you send inyour solution.
* Consultation with people other than the contest director is prohibited.
* Do not work in a team environment.
* Submit questions to <email@example.com <mailto:firstname.lastname@example.org>> who will try to fathom
an appropriate answer for you (and post it to the hs-computing
list, if appropriate). Many times, the reply will often be
a suggestion to read the problem more carefully.
* 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). Do not ask someone where to look up an answer though, that counts as `consultation with people.'
* Spend no more than three sessions solving problems (i.e., if
you work one hour in a session, take a one hour break, and then work another hour, you have worked for two sessions).
* Spend no more than a total of five hours solving problems. Really.
* Submit source code for the problems to the contest coordinators via e-mail to email@example.com <mailto:firstname.lastname@example.org> (see below for format).
* Solutions will be judged for correctness by running them against
several (usually 5-15) different sets of input 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 take two weeks to complete.
* Unless otherwise stated, your program must run no longer than
5 seconds for any test case on the judge's computer (approximately 200 MHz PentiumII).
* Unless otherwise specified, it is NOT guaranteed that all possible legal datasets will be solvable within the time limit.
* The judges reserve the right to increase time limits during grading.
* Judges will not test all datasets against a program that crashes the computer for initial datasets.
* Decision of the judges is final.
* Do not cheat; it's no fun for anyone. Cheaters are often disqualified and banned.
* Do not use inline assembler statements.
* Do not submit programs that use data files that aren't supplied by the contest coordinators. Read only the specified input files and write only the specified output files.
* Do not use `temporary' data files.
* Keep in mind that this is neither a `tricky input' nor a `tricky output' contest, in general. Input and output formats are straightforward, though the input values may cause your
* Problems are intended to be algorithmic in nature, meaning clever algorithms and/or data structures may be needed to score full marks.
* All problems are intended to be straightforward (yet challenging); no problems are intended to have `hidden tricks' in them.
* Nevertheless, legal but complex datasets are fair game for testing.
* If you find a problem with poor wording or an ambiguity, document your assumptions carefully and move on. Send e-mail; we'll reply if we can.
* We will be using automated grading procedures.
* The registration information at the front of each solutionshould be in precisely the same format as requested below. Otherwise, your solution could be lost. Be sure that each program has identically the same registration information.
* Programs that consist of essentially nothing more than print statements will not be graded. Programs must compute the requested answers.
* Submitters of programs that attempt to thwart grading procedures will be forever disqualified from USACO contests. Do not join this elite club!
* Rob Kolstad <email@example.com <mailto:firstname.lastname@example.org>> is this contest's director.
* Russ Cox is this contest's grader.
* During the contest, feel free to send questions (one per e-mail please!) to <email@example.com <mailto:firstname.lastname@example.org>>. 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').
* All programs read their input from file INPUT.TXT; do not specify a complete path name in your `open' statement, just
* All programs write their output to file OUTPUT.TXT; do not specify a path name in your `open' statement, just `OUTPUT.TXT'.
* Remember that your output should be written only to the file OUTPUT.TXT. Do not clear the screen or print anything to the screen.
* Note that test data run by the judges will surely be more challenging than the example data supplied with each problem.
* We will assess scoring penalties when certain rules are abused.
* Don't use any of C++'s Standard Template Library (STL) or any classes other than those provided by iostream.h and fstream.h. We're using a very old C++ compiler: it probably doesn't know about the special classes you want to use.
* If your source code does not compile without changes, your program will not be graded. The only exception to this is: we will sometimes fix source codes mangled by mail agents' treatment of line wraps and the like.
* Don't use C's ``bool'' type. That is specific to Borland C/C++ 5.0. If you can compile your code under ANSI C, you're probably safe.
* Pascal users must not use the CRT runtime library. That is, do not include `uses crt;' in your program.
* Your programs should neither expect nor depend on having any more than about 500 kilobytes of free conventional memory (as reported by DOS's mem command).
* Note that all the examples are intended to be correct and helpful. If you find an apparent error, please contact <email@example.com <mailto:firstname.lastname@example.org>> so he can correct the problem. Some of the examples have only been double-checked, not triple-checked.
* The scorer will compile with exactly the command-line compiler options you specify in your '#pragma options' line. You must set any relevant options using the appropriate method in the source file. (Of course, if you don't wish to specify any, you can omit the #pragma line.) Note that not all command-line options are valid in the "#pragma". In particular, don't bother specifying "-P" or "-P-" on the "#pragma option" line, as the compiler will not accept it.