The HKOI 2023/24 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 2023/24 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 2007 are eligible for the Junior Group whereas those born on or after 1st July 2004 are eligible for the Senior Group. Each student may only participate in one group.

Each day 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 2023/24.

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 do not show up by the reporting time 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 paper will include both English and Chinese versions side-by-side. The programming language used in the Heat Event will be C++ (C++20).

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

Final Event

In the Final Event, participants of both Groups will take a practical test. The duration will be 3 hours. Contestants who do not show up by the reporting time will be disqualified. Early leave is not allowed.


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.

Contestants will only receive the language version selected in the nomination form. However, contestants may read the other language version by changing the HKOI Online Judge display language setting.

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.

There is a small chance that the score may change due to change of tests, or indeterminacy of the contestant’s submission. Indeterminacy may arise intentionally due to the use of random number generators, or unintentionally due to programming bugs or marginal running time. The Adjudicators reserve the right to re-evaluate submissions, and the final score will be that yielded by the final evaluation.

Programming Languages

Contestants shall answer in C++ (C++20) using g++-12.

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.4
C (C99) gcc-12
Java 8 JDK 1.8.0
Python 3.8 Python 3.10.7
Not Applicable HKOI Online Judge ‘Code’ feature
Visual Studio Code (with Pascal, C/C++, Java, Python and Code Runner plugins)

Resources and Workstation

Each contestant will be assigned a workstation to connect to the competition Virtual Machine. Contestants must not exit the Virtual Machine environment to interact with the workstation.

Contestants are not allowed to use any other written or electronic resources in the competition.

Virtual Machine


CPU: 4 vCPUs (implemented as 4 hyperthreads on 2 physical cores). Base frequency 2.5 GHz or higher.
Memory: 8 GB or higher
Disk space: At least 2 GB free space on local disk

Personal Keyboard and Mouse

Contestants are recommended to bring one personal keyboard and one mouse for use in the competition.

Wireless devices or devices 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 device.


– Operating System: Debian 10 “Buster”
– Display Manager: XFCE4
– Google Chrome
– Software listed in the “Programming Languages” section
– gdb, vim, nano, zip, unzip, cppreference-doc-en-html

Submitted programs will be compiled using the compilers and compilation flags specified in the Help page of the Online Judge.


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


If contestants wish to drink water or go to the toilet, they must make a request using the Questions / Announcements feature. Contestants may only drink water or go to the toilet upon approval by the invigilators. The invigilators may reject any request that is deemed excessive, or if another contestant is visiting the toilet. It will be regarded as cheating if you drink water or leave the seat without the invigilator’s approval.

Penalties and Disqualification

A contestant may be disqualified from the competition or suffer a penalty if the contestant:
(1) cheats, attempts to cheat or helps other to cheat
(2) does not meet the eligibility for the age group
(3) has personal particulars that do not match those provided in the nomination form
(4) does not bring all the required documents (HKID card and/or Student ID card)
(5) improperly obtains or attempts to obtain knowledge of question papers prior to the competition
(6) has unauthorised physical or electronic article(s) within reach during the competition, whether or not the article(s) could be used for cheating
(7) communicates or attempts to communicate with any persons during the competition in an attempt to gain unfair advantage
(8) leaves their assigned seat without invigilator’s permission
(9) tampers with the competition workstation, other contestants’ work, judging system network and/or other systems
(10) violates the HKOI Online Judge terms of use, before, during or after the competition
(11) starts to read or work on the question paper before being instructed to do so or continues to hold any stationery or work on the answer script after being told to stop working at the end of the competition
(12) disobeys the reasonable instructions of an invigilator
(13) reverse engineers the test data (please refer to IOI rules for details)

Serious offenders may be banned from all HKOI-related activities.

In the Heat Event, penalties will be given for failing to fill in the answer sheet properly. The penalty for each instance shall be no less than 1% of the full marks.