The HKOI 2019/20 is comprised of the Heat Event and the Final Event. The competition focuses on problem-solving, basic algorithms, data structures and programming techniques.

The HKOI 2019/20 is divided into two groups, namely the Junior Group and Senior Group, according to the age of the participants. Students born on or after 1st July 2003 are eligible for the Junior Group whereas those born on or after 1st July 2000 are eligible for the Senior Group. Each student may only participate in one group.

Each secondary school in Hong Kong will be allowed to nominate up to 16 students, including 8 Senior Group nominees and 8 Junior Group nominees, to participate in the HKOI 2019/20.

Schools may also choose to nominate students who are members of the 2019 HKOI Training Team through the Hong Kong Association for Computer Education (HKACE). However students nominated through the HKACE would NOT be counted as members of the school team and hence their scores would not contribute to the school score.

Questions will be available in both Chinese and English versions. Verbal instructions will be given in Cantonese. For participants who do not understand Cantonese, instructions in Putonghua or English will be provided on request.

Contestants should note that photos may be taken and publicized for promotional purposes.

Heat Event

In the Heat Event, contestants of both Junior and Senior Groups will have to complete a written paper, consisting of multiple-choice questions and short questions. The duration will be one and a half hours. Contestants who are late for more than 15 minutes will be disqualified. Early leave is not allowed.

Other than basic stationery, contestants are not allowed to use any of their own resources, including paper and calculator, in the competition.

The programming languages used in the Heat Event will be Pascal (Free Pascal) [NOTE], C (C99) and C++ (C++98). Programs / program segments in all 3 programming languages will be given side-by-side. Contestants must indicate their choice of language on the answer sheets. (Choose only one)

For each group, the minimum qualifying score shall be the lowest score such that not more than 90 contestants advances.

Final Event

In the Final Event, participants of both Groups will take a practical test. The duration will be three hours. Contestants who are late for more than 15 minutes will be disqualified.

Programming Languages, Workstation and Resources

Contestants shall answer in C++ (C++11) using Dev-C++ 5.11 (TDM-GCC 4.9.2).

Contestants may also use the following 2nd-class programming languages and development software. 2nd-class programming languages are experimental. We cannot guarantee that the problems are solvable using such languages. We also cannot guarantee the proper functioning of the software provided. Contestants may use such languages at their own risk.

2nd-class Language 2nd-class Development Software
Pascal Free Pascal 3.0.0
C (C99) Dev-C++ 5.11 (TDM-GCC 4.9.2)
Java 8 JDK 1.8.0
Python 3.5 Python 3.5.2
Not Applicable Visual Studio Code (with Pascal, C/C++, Java and Python plugins)

The organiser will provide all the necessary hardware and software for the competition. With the exception of one personal keyboard (see section below), contestants are not allowed to use any of their own resources in the competition.

Contestants shall develop their solutions in Windows operating system. However, submitted programs will be compiled under the Linux operating system.

During the competition, contestants are allowed to seek clarification on the wordings of the tasks from the Adjudicators by raising their hand. Should the condition deem necessary, the clarifications will be announced to all contestants. Clarification related to the solutions will not be entertained.

Personal Keyboards

Contestants can bring one personal keyboard for use in the competition. Wireless keyboards, keyboards that require installation of drivers, and mechanical keyboards fitted with “blue” switches (or equivalent) are not allowed. The adjudicators reserve the right to examine and disallow any keyboard.


The paper shall consist of several programming tasks. Each task may carry different points. Each task will be further divided into one or more subtasks. Each subtask may carry different points.

Submission of Solutions and Adjudication

Contestants should submit their solution source codes through a web interface. The adjudicators will compile the source codes submitted by contestants, and then assess the compiled programs by testing them with a set of data unknown to the contestants and a marking scheme to be determined by the Adjudicators. To score points for a subtask, contestants’ programs must be correct for all test cases in that subtask.

Contestants will receive feedback about their submissions, including type of error first encountered (if any) for each subtask. A contestant’s final score will be the sum of points received from solved or partially-solved subtasks. Contestants may submit at most once per task per 60 seconds, and at most 50 times per task.


Any queries about the competition should reach the Chief Adjudicator immediately after the competition. The decision of the Adjudicators will be final.

Special announcement regarding Pascal programming language

For the advancement of the competition and to align with IOI’s decision, the HKOI Organizing Committee will be making the following arrangements regarding the Pascal programming language unless circumstances change.

– HKOI 2019/20: Pascal has become a 2nd-class language in the Final Event. Pascal in the Heat Event will remain unchanged. Also, the syllabus will explicitly include divide and conquer sorting algorithms — Quick Sort and Merge Sort.
– Team Formation Test 2020: Pascal will be removed from the TFT.
– HKOI 2022/23: Pascal will be removed from both Heat Event and Final Event.