High School Programming Competition | Computer Science | Departments | Faculty of SASE | UNB

Global Site Navigation (use tab and down arrow)

Back to High School

NB High School Programming Competition

Thursday, May 13, 2021 (9 a.m.-12:30 p.m.)

(expected to be held again in May 2022: this page will have details once they are decided)

A computer programming challenge for high school students

The New Brunswick High School Programming Competition brought talented students from high schools throughout NB to the UNB Saint John campus for 13 years.  In 2021, though, the contest was virtual and (a change) students competed individually, rather than in pairs. Students  competed under the supervision of their teachers. We also hosted a small "open" division (Saturday, May 15, 12:30 - 4 p.m.) for NB students who did not get to compete in the supervised contest.   The same problems were used.

Contestants test their computer-programming skills and problem-solving abilities. The contest consists of a number of programming problems of increasing degrees of difficulty for individuals to complete. The person who solves the most problems wins.

This year, students mostly competed for the fun and glory. There were some small swag-based prizes sent to the top three contestants in both divisions, and there were door prizes awarded to a few randomly chosen contestants.

View our photos from the 2019 event and the 2021 poster.

See the quick announcement of the results and draws for door prizes

See a story from the UNB media people about the 2021 contest and its first-place winner (Victor Huang from Fredericton High),

Adventures in 2021

With the move to a new contest platform (Kattis) and students competing in different locations, we were expecting technical glitches.  Mercifully, they did not occur.  Instead, one Saint-John-area school (Kennebecasis Valley) had students, including some who wanted to compete,  who had to self-isolate after possible Covid exposure.  A Fredericton school (Leo Hayes)  with several  contestants was completely closed due to Covid. And a Moncton school (Harrison Trimble) was in lockdown for more than an hour due to reported gunshots nearby.  Hopefully Harrison Trimble's contestants get a fair opportunity in 2022.

Final Results

We had about 40 students from 13 different schools.  Results can be seen on the scoreboard from the contest site. 

How to enter

Due to the virtual nature of the contest, schools could send as many students as they wished.  Teachers from participating NB high schools could register their students for the proctored contest on May 13. (See the section below for a registration link for the unsupervised division on May 15, intended only for those who could not compete on the 13th.)

Registration needed to be completed by noon on May 10. 

For more information, contact nbhspgmcomp@unb.ca. If you are a teacher from a school that has not participated recently, we'd really like to add you to our mailing list.

Sample problems

Looking to hone your skills? See the sample problems for 2019 or previous years (2018, 2017, 2016, 2015, 2014).  The problems used in 2021 are linked from the scoreboard.


We thank our long-term and new sponsors:

  • J.D. Irving, Limited - Information Technology Division
  • IGT
  • PatriotOne
  • Troj.AI
  • Encore Interactive
  • Propel
  • NBCC Saint John
  • UNB Recruitment
  • UNB VP Saint John

Contest rules

See our contest rules. These rules and procedures may be modified and/or extended right up to the time of the competition. Registered contestants will eventually be sent a link to a form where they can acknowledge having read and agreed to the rules. (Note: the rules currently say there should be no communication between contestants and their teachers. An important exception is when teachers are serving to supervise the contestants: communication about the rules is to be expected, and help in getting Kattis or an IDE working would also be permitted.)

 For 2021, students compete individually, rather than in a team.


Open (Unproctored) Division

The open division was intended for NB high-school students who cannot compete on May 13.   (Perhaps they are home schooled, or their schools cannot provide supervision, or they have a time conflict on the 13th.) Our open division was an unsupervised contest on Saturday, May 15, starting at 12:30, for these students. The registration deadline was Monday, May 10, at noon. (If it is possible with the Kattis system, we will attempt to add late registrations received until 5pm on May 13 - after that does not leave time to confirm that someone is a NB student. To register late, you needed to be sure to have created a Kattis account and provided the linked email address when you filled out our registration form. And you needed to have filled out  the rules-acknowledgement form. We couldn't promise that late registrations could be processed.) Contestants could register themselves, but they needed to provide the email of a teacher (or parent, for homeschooled students) who could verify their status as a NB high-school student. 

The time duration (3.5 hours) and rules were the same as for the proctored division.

Please note that you cannot compete in both the proctored and unproctored divisions.

Register for the open (unproctored) division.


To gain familiarity with Kattis, potential contestants will need to create accounts at Open Kattis and they may also want to tackle some of the easiest-rated problems there. (The set of public problems is mostly intended for university students.  Our contest will be developing a set of new problems suited for high-school students.) Teachers will find that it is easy to pull together practice contests with existing problems on Open Kattis.

We have prepared a document, "Getting Started with Kattis". It is highly recommended to try out the steps highlighted in this document, so as to avoid problems during the competition. A second document, "Kattis During Contest,"  explains additional Kattis aspects needed during the contest.

The registration process requires you to give the email address that was used to set up your Kattis account. (If a different email address is given, there will be difficulties.)

Getting help during the contest:

Once the contest is running, contestants can use the Kattis "clarifications" system to ask questions about the problems they are supposed to solve, in case the problems seem unclearly worded. Do not use the clarification system for technical help (eg, difficulties with Kattis). 

For the most part, non-clarification questions during the contest should be emailed to  <former email...> Contestants and teachers will be emailed a link to a Teams meeting that runs during the contest, but it is intended to be used only for very quick/simple Kattis-type technical issues that can be handled verbally.  Email is probably better for most questions.

2021 results

  1. Congratulations to Victor Huang, a Grade 9 student at Fredericton High, who took first place (the Bill Davis trophy). He solved all eight of the problems with almost an hour left - this is not supposed to happen.
  2. Yihong Chen, a Grade 11 student from Rothesay Netherwood School, won second place.
  3. Sunny Kim, a Grade 12 student from Moncton High, came in third place.

Second and third place finishers solved seven of the eight problems, which is also impressive.


About the competition

Every year (except Covid years!)  teams from high schools across New Brunswick are invited to UNB Saint John's High School Programming Competition. Regardless of who takes which titles, every student will be a winner! Each student will have won by gaining the experience of working as part of a team, participating in a fun event, and making new friends. 



all logos