Alabama High School Programming Contest

The State of Alabama High School Programming Contest (HSPC) hosted by UAB brings talented students from high schools throughout Alabama to the UAB campus to participate in an organized competition. Students individually compete to demonstrate their programming skills and problem solving abilities by attempting to solve six programming problems within a three hour period. Schools that have three or more contestants are also eligible for team awards.

Who can participate?

ALL Alabama high school students and advanced junior high students.

REGISTRATION DEADLINE IS FRIDAY MARCH 10. REGISTRATION FEE IS $20. After March 10, registration fee is $30.

Register Now


This year’s monetary awards are provided by a grant from the National Security Agency (NSA).

Individual Prizes

  • 5 individual prizes be awarded

Team Prizes

  • 2 team prizes will be awarded
  • Schools with 3 or more contestants are eligible

Grace Hopper Awards

  • Given to top female contestants


  • The competition is open to all Alabama high school students (public, private, or home schools).
  • A high school student is any student currently enrolled in grades 9-12. Seniors who graduate in 2017 are welcome to participate.
  • There is an individual contest (first 5 places awarded). A team is also provided for those schools having three or more participating students (first 2 places awarded).
  • The contest will consist of 6 or more problems to be solved over a 3 hour period. The set of problems will span various levels of difficulty.
  • Solutions to the problems must be coded in Java or C++ or Python. No other languages are allowed.
  • You are allowed to bring a total of two books to the contest. These must be “traditional” books – you may not compose your own book or set of notes unless they are in a binder.
  • You are NOT allowed to bring any software or disks into the lab.
  • If you need a piece of paper, you may ask the lab proctor for blank paper.
  • Any question should be submitted to the judges in writing.
  • Each clarification question will be considered and acknowledged, but the judges reserve the right to not answer any question that may reveal the answer. The question and its answer may be provided to all contestants if it seems relevant.
  • Performance is a criterion for judging if a solution is correct. Your program must finish and deliver a correct answer within one minute in order to be considered correct. For some of the problems there may exist a solution that might work, but is so inefficient that it will take longer than a minute to finish.
  • You may work on the problems in any order, and submit them in any order.
  • There will not be any third party libraries provided for you. Only standard libraries will be provided, but you may type in any support libraries on your own and submit them as part of your solution.
  • The judges’ decisions are final.

After a problem is judged, one of the following responses will be returned to the contestant:

  • Correct
  • Incorrect Output
  • Incorrect Output Format
  • Incomplete Output
  • Failed Test Case
  • Compiler Error
  • Run-time Error
  • Run Time Limit Exceeded

A contestant may submit a program for judging as many times as they wish. If a program is judged to be incorrect, the contestant may resubmit later.

  • Ranking will be based on overall score, where the score is determined primarily by the number of problems solved correctly.
  • Time will be used as a secondary scoring method in order to break potential ties. In the case where multiple contestants have solved the same number of problems, the tie breaker will be the total time taken to solve the correct problems (i.e., the contestant solving the problems in the least amount of time will have the higher ranking). A third-level tie breaker will default to the flip of a coin :)
  • For each incorrect submission, a penalty of 20 minutes will be assessed to the contestant.
  • In computing team rankings, the top three scores of students from each school will be considered.


  • Food and drink are not allowed in the labs. There will not be an official break, but you may briefly leave the contest area to go to the restroom or to get a drink.
  • Each student will be assigned a computer in one of the UAB CS labs. You may use only the assigned machine to solve the problems – you may not use your own laptop.
  • The Internet will be turned off in the labs. You may not search the web or use the Internet in any other way in order to obtain hints or tips.
  • While in the lab, all electronic devices must be turned off. Electronic devices are not allowed to be used during the competition. In general, any disturbance that causes other contestants to lose their concentration will be handled by the lab proctors.
  • You may not use a wireless device to contact or talk to anyone during the contest period.

The UAB CS labs are equipped with the following computers and software:

  • Eclipse for Java and C++
  • Netbeans for Java and C++

Schedule of Events

Start End Activity Location
10:30 am 11:30 am Check-In / Late Registration Campbell Hall
11:00 am 11:30 am Lunch Campbell Hall
11:30 am 11:45 am Welcome and Orientation for HSPC TBA
12:00 pm 3:00 pm HSPC Contest TBA
3:15 pm 4:00 pm Award Presentation TBA
Parking: The closest parking lot is the parking deck on the south side of University between 12th St and 13th St.

Sample Questions

The contest problems are available from the following past competitions:

History of the UAB HSPC

In 2005 Dr. Jeff Gray, CS Professor, organized and led the first High School Programming Contest at UAB – 8 students participated. After Dr. Gray’s departure from UAB in 2010, the HSPC went into a hiatus until 2013. Following a long-term collaboration with the College of Education in outreach to high school students for early Math placement testing, Dr. Alan Sprague took over the lead of the HSPC in 2013-4. Dr. Sprague reconfigured the HSPC as a statewide competition and reached out to high schools through the Alabama State Department of Education (ALSDE). The contest has grown each year, attracting participants from across the state. Since 2015 the Alabama State Department of Education (ALSDE) supports the HSPC by publicizing it in the Alabama Education News newsletter.

NSA Grant in 2016-7 Dr. Alan Sprague along with co-PI, Dr. Raquel Diaz-Sprague, obtained a Cyber Competition Award to expand the High School Programming Contest and encourage female participation.

Synopsis of 2017 HSPC
The 2017 HSPC succeeded in its goals to increase gender diversity and overall participation. For the first time in its history the HSPC offered Grace Hopper Awards to the top three female contestants. The increased in gender diversity was significant. There were 10 girls among the 48 registered contestants in 2017 (21%)versus 2 girls among 35 contestants in 2016 (6%). The HSPC 2017 was offered as a two-tier contest, an 11-12th grade tier and a 10th grade and below tier. Forty-eight valid registrations were received from students in schools in Huntsville, Mobile, Birmingham and Montgomery. Prizes were funded by a grant from NSA.

UAB News


NSA grant #H98230-16-1-0348 is this year’s sponsor of the monetary awards.

Director Dr. Alan P Sprague, Professor

Collaborators: Dr. Raquel Diaz-Sprague (NSA grant Co-PI). Dr. Peter Pirkelbauer, Greg Bowersock, Cooper Filby, Amalee Wilson, ALSDE, and the UAB ACM Chapter.



  • UAB Computer Science
  • 115A Campbell Hall
  • 1300 University Boulevard
  • Birmingham, Alabama 35294-1170
  • 1.205.934.2213