Mid-Atlantic Regional Contest 2002 Problems
Problem description (modified
to reflect clarifications issued during contest).
Practice Problem
Judges'
Solutions and Test Data
Clarifications issued during contest
- Problem E: A Baron Landscape
- Q: Does "within 6 days" mean <= 6 or <6.
A: <= 6
- Problem B: An Amazing Problem
- Q: Is the space outside the maze the letter 'O' or the
number 0 (zero)?
A: The space is the letter 'O' not the digit '0'
- Problem A: A Simple Question of Chemistry
- Q: How do we display a difference of exactly zero? (With regard to the no leading zeros restrictions)
0.00?
.00?
Some other way?
A: We prefer 0.00, however we have accepted .00
- Several problems
- Q: Are we supposed to have an endline after "End of
Output"?
A: We will accept either way. We prefer a newline.
Judges' Comments
- Time limit
- This year the time limit was reduced from 2 minutes to 30
seconds. In the past, we have found that for problems where the
time limit is an issue, typically a good solution completes in
seconds, whereas a bad solution may take hours. Therefore, it was
generally obvious within a few seconds whether the solution was
valid or not, but judges had to wait for the full two minutes
for each submission. This wait caused backlogs in judging these
problems. This year we reduced the time limit to reduce these
backlogs. The judges' solutions, in both C and Java, for all of
the problems solved the test data used during the contest in
under two seconds on an 800Mhz P3.
- Problem B: An Amazing Problem
- This was the most unusual of the problems. A number of
teams seemed to have a hard time understanding the concept
behind the question, asking clarifications such as "Do we have
to find the optimal path?" Obviously an optimal path can't be
calculated unless you have a map of the entire maze at the
start, which you don't in this problem.
We found that some submissions did not work because they used
IO calls that did not flush the output buffer after each
line. Because we felt that output buffer flushing was beyond
the scope of the programming contest, we modified such
submissions to flush their buffer after each line before
judging them.
- Problem C: Spelling Be
- This problem is essentially a test of algorithm efficiency.
The dictionary and emails are large enough that simply reading
the dictionary into an array and doing linear search on it for
each word will take too long. Any reasonably efficient solution
to sorting and searching will solve the problem in a second or
less. Our Java solution uses a
HashSet
from the
JDK API to achieve constant time storage and lookups. Our C++
solution uses old-fashioned qsort
and
bsearch
from stdlib. A C++ STL solution using
vectors and sort could also be used.
Alternatively, a team could have coded up an efficient sort
and search on their own. But one of the important skills in a
programming contest is recognizing the power of the tools you
have at your disposal. For teams that use libraries
effectively, this was an easy problem.
Last modified: Wed Nov 27 14:50:33 EST 2002