Dept. Info
Programming Contests



Programming Competition


Contest Problems and Solutions

March 22, 2019

There were nine problems in the 2019 Programming Contest.  The first seven were programming problems and the last two were 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 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 are ailable.

Dr. David Levine of the Computer Science Department drafted the problem statements and wrote the various solutions that we have made available.  He was assisted by Dr. Steve Andrianoff, but all blame for any error goes to David.

Problem 1:  I am IronMan! (PDF)

How much progress has a participant made towards a goal of completing a modified IronMan race?

Java solution to Problem 1:  

Test data for Problem 1: data1

Problem 2:  Tracking A Run  (PDF)   

Given a GPS track, how much distance was covered?   How much climb was there?  How much descent?

Java solution to Problem 2:

Test data for Problem 2: data2


Problem 3:  Crushing Games (PDF)  

Can you mimic the "crushing action" of a simple move in a CandyCrush-like game?

Java solution to Problem 3:  

Test data for Problem 3: data3


Problem 4:  Pseudobinary Numbers (PDF)  

A number is pseudo-binary if it "appears to be binary", i.e. has only 1's and 0's in its decimal representation.  What is the minimum multiple of a given number that is pseudo-binary?

Java solution to Problem 4:  

Test data for Problem 4: data4


Problem 5:  Fake Data (PDF)   A CLASS BASED PROBLEM

Given a data set, determine how well it fits to an expected distribution.   If it's not close enough, it's FAKE!

Java solution to Problem 5:  

Test data for Problem 5: data5

Java File for the class:  

Java File to demo one method of the class:  

        API for the class:  DataSource.html 


Problem 6:  Easter Basket (PDF)    A CLASS BASED PROBLEM

Simulate the work of one of the folk who help the Easter Bunny fill baskets of goodies

Java solution to Problem 6:  

Test data for Problem 6: data6

Java Files for the classes:




        API for the classes:  EasterBasketWorkstation.html  




Problem 7:  Error Correcting Palindromes  (PDF)   

Given a string, convert it to a palindrome, making as few changes as possible

Java solution to Problem 7:  

Test data for Problem 7: data7

Problem 8:  Screen Usage   (PDF)   A TESTING PROBLEM

Given a bunch of windows, how much of the screen area do they (collectively) take up?

Description of the bug: Screen Usage Bug 


Problem 9:  Marathon Times   (PDF)   A TESTING PROBLEM

Given a bunch of times for marathon runners, who won the race?

Description of the bug: Marathon Times Bug  


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

� Copyright St. Bonaventure University 2011 All Rights Reserved