Skip to main content

North Allegheny wins high school programming contest

Share on:

Posted on Monday, June 24, 2019

Seventeen teams from five high schools attended this year’s Westminster College High School Programming Contest hosted by the mathematics and computer science department, in conjunction with the admissions office, on Friday, March 15.

Participating schools and team coaches were:

  • Blackhawk High School – Coach Kelli Ambler
  • Nichols School - Coach Jason DeGroat
  • North Allegheny High School - Coach Laura Prosser
  • Seneca Valley High School - Coaches Diane Krauland and Chad Robertson
  • Wilmington High School – Coach Mary Beth Acker

The teams, consisting of 3 to 4 high school students each, worked for two and a half hours on six computer programming problems. Students submitted solutions and received feedback from the judges electronically, while an electronic score sheet displayed updated results throughout the contest. Scoring for each problem is based on the time since the beginning of the contest as well as the number of incorrect submissions. This year’s winning team was from North Allegheny High School in Wexford, Pa.

Westminster faculty member Dr. John Bonomo, professor of computer science, designed and ran the contest. Bonomo is an active organizer and problem contributor to local, regional and international programming contests and has been head judge for the ACM East Regional Programming Contest since 2000. He has served as head judge and problem contributor for the International Collegiate Programming Competition for the past 14 years, serving in Harbin, China, in 2010; St. Petersburg, Russia, in 2013; Ekaterinburg, Russia, in 2014; Marrakech, Morocco, in 2015; Phuket, Thailand, in 2016; and Beijing, China, in 2018.

Bonomo was assisted by Dr. David Shaffer, associate professor of computer science, and computer science student Dan Jackson. More information about the contest can be found at http://www.westminster.edu/staff/bonomojp/HSContest/hspc.html.

Sample Problem: Flight Turbulence

Fly-By-Night Airlines is a low budget carrier specializing in late night/early morning flights. Things are run a little looser on this airline as was apparent a few nights ago. The flight from Ypsilanti, MI to Walla Walla, WA was completely sold out and all of the passengers were eagerly waiting to board the plane. Sensing their eagerness and looking for a little fun, the flight crew decided to open the gates and let the passengers rush to any seat they wanted, regardless of their seat assignment. The passengers were a little leery of this until the flight crew sweetened the deal with the promise of free peanuts for everyone. After a mad dash through the gates and one trampling injury all of the passengers had found a seat and were eagerly awaiting their peanuts.

Well, almost all. Wouldn't you know it, one passenger wasn't too happy with the seat he ended up with and decided he wanted his pre-assigned seat, peanuts be damned. When he threatened to call the FAA the flight crew relented and let him have his originally assigned seat, displacing the passenger in that seat. Well now, of course, THAT passenger wanted HER original seat. This dislodged another passenger who also wanted his original seat and so on. Eventually one of the dislodged passengers ended up in the seat initially vacated and things quieted down. Needless to say, the price of peanuts skyrocketed on that flight.

Some of the flight crew wanted to try this again on some other flights, but they were concerned if a similar situation might arise. They would like you to write a simulation program that would determine how many people would have to move if one person suddenly insisted on sitting in his/her assigned seat.

Sample Problem: Make America Grade Again

The University of America (UA) is having an integrity issue. It turns out that grades in many of the science classes are not being based on any graded work but on such things as attendance, grooming habits and any snacks the students bring with them. The administration has decided to crack down on this. First, they confiscated all of the snacks. Then they insisted that all grades in science classes must be on graded work in four categories: labs, homeworks, projects and exams. They don't care what percentage of the final grade is assigned to each of these as long as the total percentage assigned is 100%.

The professors at UA have grudgingly agreed to start grading their assignments, but they balk at the task of having to calculate final grades as well. They are asking you to write a program to calculate a student's final grade. They will provide you with the following information: first, the percentage of each of the four categories; second, a list of (grudgingly) graded assignments each of which fits into one of the categories. Using this, they want you to calculate a final integer percentage grade.

For example, suppose the assigned percentages are labs - 20, homeworks - 20, projects - 25 and exams - 35 and the list of graded assignments is the following:

Lab 1: 15/20           Hw 3: 61/65

Hw 1: 65/70            Exam 2: 79/100

Hw 2: 27/35            Lab 2: 17/20

Exam 1: 88/100      Hw 4: 51/60

Proj 1: 50/50           Exam 3: 141/150

To calculate the final grade you first total up the fraction of points achieved in each category. For labs it's 32/40 (there were two assignments each worth 20 and the student got a 15 on the first and a 17 on the second for a total of 32 points); for homeworks it's 204/230; for projects it's 50/50 and for exams it's 308/350. You then multiply each of these fractions by the percentage assigned to each category: 20(32/40) + 20(204/230) + 25(50/50) + 35(308/350) = 89.539. Finally you truncate this to get the final grade of 89. Then you sit back and eat all the snacks you no longer need to bring to class.

First Place Team - North Allegheny High School, Wexford, Pa.

Team Name: “NA4”
Coach: Laura Prosser

Second Place Team – North Allegheny High School, Wexford, Pa.

Team Name: “NA1”
Coach: Laura Prosser

Third Place Team – North Allegheny High School, Wexford, Pa.

Team Name: “NA2”
Coach: Laura Prosser

The Westminster High School Programming Contest is an opportunity for area high school students to show off their programming abilities in a competitive environment.Modeled after the International Collegiate Programming Contest model, teams of students work to solve a set of programming problems using limited responses from judges to guide them.