Contest Problems and Solutions
February 27, 2009
There were
nine problems in the 2009 Programming Contest. The first seven were
programming problems and the last two were the new
Challenge Problems.
Below you will find a brief description of each of the problems. By following the link for the problem you will find a more complete description of the problem including a specification of the requirements and effects of the program and examples.
For the programming problems, a Java solution, a C++ solution, and the test data that were used to test submitted programs to each problem are available as well. For the class-based problems, the source files for the (supplied) compiled classes are also provided.
For the Challenge Problems, links to a description of the bug and to the web
page used during the test are also available.
Dr. David Levine of the Computer Science Department drafted the problem statements and wrote the
various solutions that we have made available.
Problem 1: How
Long? (PDF)
A trip of known length has a desired average speed. After completing
part of the journey, the traveler desires to know how fast the remaining
trip must proceed in order to meet the goal. C++ solution to Problem 1:
HowLong.cppTest data for Problem 1:
data1
Problem
2: What is the Area? (PDF)
A trapezoidal approximation to the
area under the curve of a non-negative function must be computed. Java solution to Problem 2:
Area.javaC++ solution to Problem 2:
Reimann.cppTest data for Problem 2:
data2
Problem 3:
Satisfiability (PDF)
A sequence of disjunctions of boolean variables is presented. What is
a truth assignment for the variables that will satisfy all of the clauses? Java solution to Problem 3:
Satisfy.java Test data for Problem 3:
data3
Problem
4: Squiggly Sudoku (PDF)
A CLASS BASED PROBLEM
A prospective solution to a Squiggly Sudoku problem is given. Is that
solution valid? Test data for Problem
4: data4
API for the class:
SudokuBoard.html
Problem 5: Job
Scheduling (PDF)
A number of jobs must be completed. Jobs can be done in parallel, but
some have pre-requisites. If it is even possible to do them all, how
long does it take? Test data for Problem 5:
data5
Problem 6:
World Series (PDF)
Given the chance that your team will win any one game, what is the chance
that it will win its playoff series? Java solution to Problem 6:
Winners.java C++ solution to Problem 6:
WorldSeries.cpp
Test data for Problem 6:
data6
Problem 7: Component
Testing (PDF)
A CLASS BASED PROBLEM
A group of prototypes for a new device have been produced. Test the
prototypes and determine the maximum stress that they can resist. Both
prototypes and time are a limited resource. Java solution to Problem 7:
Tester.java Test data for Problem 7:
data7 API for the class:
ComponentLot.html
Problem 8: Undo
Sequence (PDF)
A TESTING PROBLEMA series of
actions, undos, actions, undos, etc. is undertaken. Determine the net
number of actions performed.
Note that since this is a testing problem, the
real challenge is to determine the bug in the judge's code - which is
available as an applet on a web page only.
Actual contest web page:
Undo Sequence Applet (Not yet linked)
Problem 9: Polygon Inclusion (PDF)
A TESTING PROBLEMGiven a
well-behaved polygon (no edge crossings, etc.), determine if a test point
lies inside it.
Note that since this is a testing problem, the
real challenge is to determine the bug in the judge's code - which is
available as an applet on a web page only.
Actual contest web page: Polygon Inclusion Applet
(not yet linked)
For additional information, please contact:
Dr. Steven K. Andrianoff, Contest Director
Department of Computer Science
St. Bonaventure University
St. Bonaventure, NY 14778
Phone: (716) 375-2053
FAX: (716) 375-7618
|