Eligibility and Nomination

Contestants are divided into two groups, namely the Junior Group and the Senior Group, depending on their level of study and age. For HKOI (n-1)/n, students born on or after 1st of July, year (n-20) are eligible for the Senior Group. Those studying at Secondary 4 / Grade 10 / Year 11 and below and born on or after 1st of July, year (n-17) are also eligible for the Junior Group.

HKOI only accepts nominations through schools on a first-come-first-served basis. Each day secondary school in Hong Kong may nominate up to 8 students to the Senior Group and 8 students to the Junior Group. Each student may only be nominated to one group.

Heat Event

In the Heat Event, contestants of both Junior and Senior Groups will have to write 2 papers – namely Paper 1 and Paper 2. Contestants who do not show up by the reporting time will be disqualified. Early leave is not allowed. There is no break time between the 2 papers.

Both papers consist of multiple-choice questions and short questions. The papers will include both English and Chinese versions side-by-side. Verbal instructions will be given in Cantonese and English.

Contestants should write down their answers on the answer sheet according to the instructions. They are not allowed to use any written or electronic resources (e.g. dictionaries, calculators) in the competition.

Paper 1

Paper 1 is a 50-minute paper. The full mark of Paper 1 is 25 points and each question may carry a different number of points. It consists of questions applicable to both Python and C++. All questions are to be attempted.

Paper 2

Paper 2 is a 40-minute paper. The full mark of Paper 2 is 20 points and each question may carry a different number of points. There are 2 versions of Paper 2 – Python version and C++ version. Questions in each version may require knowledge specific to that programming language. Contestants will receive both versions, but the contestant must attempt exactly one version and indicate the selected version on the answer sheet. For contestants who attempt both versions or do not indicate their selection properly, their Python version will be disregarded.

Marking

For a contestant who attempts the C++ version in Paper 2, their Final Mark will be the sum of their Paper 1 mark and Paper 2 C++ version Raw Mark.

For a contestant who attempts the Python version in Paper 2, their Paper 2 Python version Raw Mark will be equated to become the Paper 2 Equated Mark. The process is described in the Appendix. Their Final Mark will be the sum of their Paper 1 mark and Paper 2 Equated Mark.

For each group, the minimum mark to qualify shall be the lowest Final Mark such that not more than 96 contestants advance.

Final Event

In the Final Event, contestants 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 4 programming tasks, each carrying 100 points. The full mark of the paper is 400 points. Each task will be further divided into one or more subtasks. Each subtask may carry different points.

Contestants will only receive the printed question paper in the language version selected in the nomination form. However, contestants may read the other language version by changing the HKOI Online Judge (“the Online Judge”) display language setting. Verbal instructions will be given in Cantonese and English.

Contestants are not allowed to use any written or electronic resources (e.g. dictionaries, calculators) in the competition, except software provided (e.g. built-in calculator utility).

Submission of Solutions and Judging

Contestants should solve the tasks by writing programs using one of the allowed programming languages. They should submit their solution source codes through the Online Judge during the competition time. Contestants may submit at most once per task per 60 seconds, and at most 50 times per task.

Once the submission is received, the Online Judge 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. When judging is completed, usually within a few minutes, the contestant will receive feedback about the submission, including the type of error first encountered (if any) for each subtask. To score points for a subtask, contestants’ programs must be correct for all test cases in that subtask. A contestant’s final score will be the sum of points received from solved or partially-solved subtasks.

There is a small chance that the scores 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.

No extra time will be given even if the judging feedback is delayed or cannot be provided.

Programming Languages and Environment

Contestants shall implement their solutions in C++ (C++20).

Python (3.10 or above) is also available as a 2nd-class programming language. Not all tasks and subtasks are solvable using Python.

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.

While keyboard and mouse will be provided, contestants are recommended to bring one personal keyboard and one mouse for use in the competition. Wireless devices or devices that contain programmable keys, 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.

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

Installed software
– Operating System: Debian 10 “Buster”
– Display Manager: XFCE4
– Google Chrome for accessing the Online Judge and the built-in “Code” IDE
– Visual Studio Code (with C++, Python and Code Runner plugins)
– g++12
– python3.10
– gdb, vim, nano, zip, unzip, cppreference-doc-en-html

The specific versions of the applications in the Virtual Machine may differ from the ones used for judging. Submitted programs will be compiled using the compilers and compilation flags specified in the Help page of the Online Judge.

Queries

During the competition, contestants are allowed to seek clarifications by using the Questions / Announcements feature. The invigilators will answer the clarification questions with one of the following:
– “No Comment/Please refer to task statement”
– “Invalid Question (not a Yes/No Question)”
– “Yes” or “No” – only when the task statement indeed contains an error or critical ambiguity. In such cases, the clarification will be announced to all contestants.

Assistance

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.

Awards

Please refer to the Awards page.

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.

Appendix

Privacy and Data Policy

Contestants should note that photos, video and screen recordings will be taken and publicised for promotional purposes.

Answer scripts and submitted program source codes may be retained and used for educational and research purposes. Results of the Final Event including the scores and detailed judging feedback of all submissions will be visible to all Online Judge users.

Upcoming changes in HKOI 2025/26

If a student won a Gold Medal in the same or higher group in the immediate previous year, such student taking part in HKOI 2025/26 or later will:
– not consume finalist quota: The student will advance to the Final Event if they score not less than the minimum qualifying marks in the Heat Event. Therefore, there may be more than 96 students in the Final Event.
– not counted in the number of finalists when determining the number of Gold, Silver, Bronze and Honourable Mentions to be awarded: The number of finalists for determination of awards quota will never exceed 96.
– not consume awards quota: The student will receive the highest award according to their score and the cut-off scores, calculated using scores based on only the remaining students.

Equating Method

Please refer to the document HKOI Heat Event Equating Method