News

PA CompSci Team Wins Invitational High School Programming Contest for Second Consecutive Year

While some Andover athletes spent the past weekend demonstrating their physical ability, others conquered their opponents a week prior with brains, not brawn. Marking its second consecutive win, the Phillips Academy Computer Science team swept the 20th annual Invitational High School Programming Contest, held at St. Bonaventure University in New York on February 15, defeating 12 other teams. The Andover team consisted of Alex Dehnert ’08, Benjamin Niedzielski ’08, John Heroy ’08 and Jiageng “David” Luan ’09. The teams were given one computer and three hours to write program solutions for nine problems. Andover solved all of the problems correctly. The challenges included simulating children’s games, analyzing statistics and detecting tumors in an MRI image. In second place, the Union-Endicott High School team from Endicott, NY solved six problems correctly. The Fairport High School team from Fairport, New York, took third place, solving five problems correctly. “One school at one point had more points by solving more questions quicker but [they] got them wrong,” Luan said. “Our team took it slower and got every question correct.” The contest judged teams both on accuracy and speed, but the time totals for all teams only included minutes on winning problems. Litvin said, “Every program had to be absolutely perfect – from calculations to spelling and punctuation – or else the program was considered incorrect.” Litvin said that she believed the team worked so well together because of their grueling practices. In preparation for the contest, the team held practice for three and a half hours at a time, during which the team members tried to simulate the actual competition. The team challenged themselves by solving more difficult problems than those included in past contests. Niedzielski said that when using the more advanced problems, the team only answered half of them correctly during the practices. Heroy added, “Our practices weren’t incredibly productive, and we did not work well as a team.” But during the competition, Andover proved their practice performances wrong. Dehnert said, “Most problems were relatively straightforward.” He said that any Comp-500 student could have figured them out. Dehnert said that the challenge was programming within the limited time restriction. The team began the competition by dividing the work according to each member’s individual strengths. Each team member then brainstormed strategies to execute once he was given access to the team’s computer. Niedzielski said that accurately typing up the problems before submitting them became an issue. Due to his skill in touch-typing, Heroy was chosen by the team to complete the first problem. Heroy’s strategy was to sit down and figure out the code in his head, before writing the code on paper, typing it into the computer, and then continuing to think about the problem. “I needed time between each step … to figure it out, to make sure I didn’t have to spend too much time debugging later,” Heroy said. “It’s a pretty long process, [with] intermittent periods of typing and thinking.” According to Luan, after a team member proposed an algorithm, the rest of the team analyzed the code for any holes or mistakes. Luan was optimistic going into the competition, especially since most of the team members had significant programming experience. Dehnert and Niedzielski had participated in the competition last year. Every team member had participated in the American Computer Science League (ACSL), an individual computer science contest that required contestants to complete one program in 72 hours. Luan had also previously participated in the United States of America Computing Olympiad (USACO), a contest held six times a year. Litvin said, “[This year’s competition] was very well-run, and the problems were very interesting … the guys really enjoyed it, not just because they won.” Niedzielski said that he enjoyed the competition because, “The problems were just hard enough to be challenging, but not an immense struggle.”