CPPO / START / 01
Scratch Coding for Kids
Logic first, for primary pupils eyeing HKPSOI.
Open the syllabusHong Kong · Olympiad in Informatics · Secondary students
Every Hong Kong student who reaches the HKOI Final spends three hours writing programs that a judge compiles and tests on hidden data. The rules name C++ as the contest language, and the results show what that means in practice. This page explains which C++ an olympiad student needs, the habits that separate a working program from a scoring one, and how we coach it: live, online, one to one, in English.
Teaching since 2020 · 10,000+ students worldwide · 4.9 from 547 Google reviews · Hong Kong lessons are one to one
The short answer
For the Hong Kong Olympiad in Informatics, learn C++: HKOI's rules ask for solutions in C++20 and call Python a second-class language that cannot solve every task, and in the 2025/26 Heat C++ takers reached the Final far more often than Python takers. An olympiad student needs modern C++ with the standard library, complexity analysis and contest habits more than the whole language. Modern Age Coders coaches it over live video, one to one with a single coach, in English, at whatever hour fits a Hong Kong school week, and the opening lesson costs nothing.
Courses first
Three courses in order of depth. A student joins where the first lesson shows they belong, with one mentor throughout.

CPPO / 01
The language itself, properly: types, references, vectors, maps, sorting and the habits contest code depends on.
Open the syllabus →
CPPO / 02
Contest algorithms in C++: complexity, search, greedy methods, dynamic programming and graphs, practised against a clock.
Open the syllabus →
CPPO / 03
For upper primary and S1 students who want to start the language early, before secondary contests begin.
Open the syllabus →The rules and the results
Two reasons, both published by HKOI. The rules make C++ the main language, and the Heat statistics show the gap between C++ and Python entrants.
HKOI's competition rules state: "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."
The Final is a "3-hour practical test" (HKOI introduction), and "The paper shall consist of 4 programming tasks, each carrying 100 points." Time and memory limits are set with C++ in mind, which is why some subtasks are out of Python's reach.
HKOI "is open strictly to registered day secondary schools in Hong Kong", so students enter through their school, and the organiser says there is no entry fee. We cannot enter anyone; a family should speak to the school's computer teacher.
For the contest's structure and calendar, see our HKOI training page; younger secondary students should read HKOI Junior preparation.
| Group, language | Took the Heat | Reached the Final | Per 100 entrants (our arithmetic) |
|---|---|---|---|
| Senior, C++ | 158 | 75 | 47 |
| Senior, Python | 292 | 24 | 8 |
| Junior, C++ | 199 | 73 | 37 |
| Junior, Python | 216 | 25 | 12 |
Source: HKOI 2026 statistics PDF (assets.hkoi.org/ref/2026stats.pdf), read 23 November 2026, rows taken from the extracted text. The last column is our own rounding of finalists divided by entrants. Part of the gap reflects who chooses C++: stronger, longer-trained students tend to.
Not the whole language
C++ is a very large language, and most of it never appears in a contest. HKOI's syllabus and training pages point to a much smaller core, and the Online Judge tells you which standards you can practise in.
| Area | What HKOI publishes | What we teach |
|---|---|---|
| Language standard | Final: C++20 (rules). Online Judge: "C++ (C++14, C++17, C++20)" | C++17 as the everyday base, plus the C++20 features that help in contests |
| Standard library | Junior syllabus: "Built-in libraries of the relevant data structures" | vector, string, pair, sort, map, set, queue, priority_queue |
| Complexity | Senior syllabus: "Algorithm analysis (time and memory complexity)" | Estimating operations from input limits before writing a line |
| Search | Senior syllabus: "Exhaustion and optimization", recursion, depth-first search | Brute force for small subtasks, then pruning and memory |
| Mathematics | "Discrete mathematics (primes, permutation and combination, modular arithmetic)" | Integer types, overflow, modulo arithmetic, sieves |
| Training topics | Training Team 2026: Level B began with "Programming in C++"; Level A covered "Dynamic Programming (II)" | Dynamic programming from the first term onwards |
Sources: HKOI competition rules; HKOI Online Judge page; HKOI competition syllabus (which says it "serves as a guide only"); HKOI Training Materials 2026. All read 23 November 2026. The third column is our teaching plan.
Inheritance hierarchies, templates written from scratch, operator overloading beyond comparisons, exceptions, and most of object-oriented design. They matter for software engineering; they rarely matter in a three-hour contest.
A student who later wants the rest of the language can take a full C++ course. Our general C++ for competitive programming page compares the two goals.
HKOI's FAQ notes that "the virtual machine that the students use for developing their solutions is based on Linux". We practise compiling from a terminal as well as in an editor, so the contest machine holds no surprises.
It also says contestants generally need not validate input: "You don't need to write extra code to check for invalid input unless the problem explicitly states otherwise." That saves minutes students often waste.
Working is not scoring
A program that prints the right answer on the sample can still score little. HKOI's FAQ explains that "you can score points for a subtask if you pass all test cases in that subtask", so one failing case can cost a whole subtask. These are the slips we see most often, from our own teaching.
An int holds about two billion. Sums, products and counts in larger subtasks go past that silently. We teach students to check every variable against the input limits and reach for long long early.
An algorithm that is fine for a hundred items times out for a hundred thousand. Students learn to estimate operations from the limits before choosing a method.
Reading large inputs with default stream settings can waste a noticeable share of the time limit. We show the standard speed-ups and when they matter.
A header such as bits/stdc++.h works with GCC but is not standard C++. When we compiled this page's lesson with Apple clang, that line was refused. Learn the real headers.
Array bounds and loop ends. In C++ reading past an array does not always crash; it can give a wrong answer that looks plausible.
A local variable with no starting value holds whatever was in memory. Compiler warnings catch many of these, so we compile with warnings on.
Calculators are not allowed at the Final (HKOI 2026/27 Final Event page), and neither is outside help, so these checks have to become habits rather than things a student looks up. Our competitive programming page explains how an online judge marks each submission.
An original lesson
Dynamic programming appears in HKOI's own training list, and the cleanest way into it is to watch a tempting shortcut fail. In this lesson of ours, a student must make an amount from coins worth 4, 3 and 1 using as few coins as possible.
// Fewest coins to make an amount: greedy versus dynamic programming. Our own lesson; the coin set is invented.
#include <iostream>
#include <vector>
using namespace std;
int greedy(const vector<int>& coins, int amount) { // coins sorted largest first
int used = 0;
for (int c : coins) { used += amount / c; amount %= c; }
return amount == 0 ? used : -1;
}
int dp(const vector<int>& coins, int amount) {
const int INF = 1e9;
vector<int> fewest(amount + 1, INF);
fewest[0] = 0;
for (int a = 1; a <= amount; a++)
for (int c : coins)
if (c <= a && fewest[a - c] + 1 < fewest[a]) fewest[a] = fewest[a - c] + 1;
return fewest[amount] >= INF ? -1 : fewest[amount];
}
int main() {
vector<int> coins = {4, 3, 1};
for (int amount : {6, 7, 10}) {
cout << "amount " << amount << ": greedy " << greedy(coins, amount)
<< ", dp " << dp(coins, amount) << "\n";
}
int wrong = 0;
for (int amount = 1; amount <= 100; amount++)
if (greedy(coins, amount) != dp(coins, amount)) wrong++;
cout << "amounts 1 to 100 where greedy is wrong: " << wrong << "\n";
}Our own lesson; the coin values are invented. Compiled with c++ -std=c++17 -Wall and run, it prints exactly the four lines below.
amount 6: greedy 3, dp 2 amount 7: greedy 2, dp 2 amount 10: greedy 4, dp 3 amounts 1 to 100 where greedy is wrong: 24
Greedy is right for 7 but wrong for 6 (3 coins against 2) and for 10 (4 against 3). Across the first hundred amounts it gives a worse answer 24 times. The table never does, because it tries every last coin for every amount.
Greedy methods are fast and short, and in a contest they are tempting. The habit we teach is to test a greedy idea against a brute-force or table solution on small inputs before trusting it on large ones.
That habit fits HKOI's subtask scoring well: the slow but correct method often earns the small subtasks, and it doubles as a checker for the fast method.
The table is a vector sized from the input, the constant INF stands in for "impossible", and the comparison is written so that adding one to INF cannot overflow a 32-bit int here. Each of those choices is a small piece of contest craft.
Notice too that the function names say what they do. HKOI's FAQ observes that code is not judged on style, but clear code is far easier to debug under time pressure.
A route to the Heat and the Final
It depends on where a student starts. Here is our 12-week plan for a student who already programs a little in any language. A complete beginner adds a first stage of plain C++ before it.
| Weeks | Focus | By the end the student can |
|---|---|---|
| 1 to 2 | C++ for someone who knows another language | Read input, use vectors and strings, compile with warnings on |
| 3 to 4 | Sorting, searching and the standard library | Sort with a custom order, use map and set, binary search |
| 5 to 6 | Complexity and brute force | Estimate operations from limits; write exhaustive search for small subtasks |
| 7 to 8 | Recursion and greedy methods | Write recursive search; test a greedy idea against brute force |
| 9 to 10 | Dynamic programming | Define states, fill tables, reconstruct answers |
| 11 to 12 | Graphs and timed practice | Use depth-first and breadth-first search; sit a full three-hour practice paper |
This plan is ours. It is not set or endorsed by HKOI. Practice tasks are written by us; we do not reproduce HKOI papers, and we point students to HKOI's own past-problem pages for official material.
HKOI gives the 2026/27 Final as Saturday 5 December 2026, with the Senior Group from 9:30 am to 12:30 pm and the Junior Group from 2:30 pm to 5:30 pm (HKOI Final Event page). The 2026/27 Heat was held on 7 November 2026.
A student starting now is preparing for the 2027/28 Heat. Twelve weeks of steady work, then regular practice, is a realistic run-up.
HKOI's Training Team FAQ says that "only Training Team members who are invited to the team by winning a Gold/Silver/Bronze medal in HKOI may be selected to the IOI", and its 2026 general information page says "only Permanent HKID holders may participate in inter-territory external competitions such as IOI, EGOI, NOI and APIO".
We prepare students for the Heat and Final. Medals and any team selection are decided by HKOI alone, and we promise neither. Hong Kong ranked sixth at IOI 2026, according to a government press release of 19 August 2026; see our IOI training page for the international contest.
Progress
Our own stages, assessed on original tasks with hidden tests. They are not HKOI levels and say nothing about medals.
| Stage | What the student does | Our check |
|---|---|---|
| 1. Compiles clean | Writes C++ that compiles with warnings on and no warnings left | Ten short tasks, zero warnings |
| 2. Library fluent | Uses vector, map, set and sort without looking them up | A timed library drill |
| 3. Estimates | Predicts whether a method fits the time limit from the input size | Written estimate before coding |
| 4. Subtasks | Scores the small subtasks of a hard task with brute force | Partial scores on our task set |
| 5. Tables | Solves standard dynamic programming problems unaided | Three DP tasks in a session |
| 6. Three hours | Manages a full practice paper: order, time, partial marks | A mock Final on our own tasks |
Partial marks are real marks. Take them.
Test the fast idea against the slow one.
Stage 3 is where contest thinking begins.
Monthly notes show the scores on each stage's tasks.
Around olympiad C++
Each runs as private live lessons in English, the way every Hong Kong booking does.
CPPO / START / 01
Logic first, for primary pupils eyeing HKPSOI.
Open the syllabusCPPO / START / 02
A gentle typed language before C++.
Open the syllabusCPPO / START / 03
Number sense for contest arithmetic.
Open the syllabusCPPO / CONTEST / 01
For school work beside contest C++.
Open the syllabusCPPO / CONTEST / 02
Combinatorics and number theory.
Open the syllabusCPPO / CONTEST / 03
C++ or Python for the DSE too.
Open the syllabusCPPO / UNI / 01
University-level algorithms.
Open the syllabusCPPO / UNI / 02
The full language, systems and modern C++.
Open the syllabusCPPO / UNI / 03
A second contest language for university.
Open the syllabusTiming
Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. Coaches sit in India, where the clock reads 150 minutes earlier than Hong Kong's whatever the season, so lessons after school or on a weekend afternoon are easy to place.
After school
A 5:30 pm lesson in Hong Kong begins at 3 pm in India.
Evening
8 pm in Hong Kong is 5:30 pm for the mentor.
Saturday
3 pm in Hong Kong, 12:30 pm in India, the slot many contest students prefer.
Compiling the way the contest machine does.
Written by us, with hidden tests and subtasks.
Every solution starts with a complexity check.
The compiler as a second pair of eyes.
The same mentor through the contest year.
Stage scores each month, no medal promises.
Student work
Projects from learners on our longer courses; the student labs page has more.

AI and ML
An AI nutrition coach that reads what you eat and works you toward a target.

AI and ML
A chatbot that answers mathematics and programming questions, built and deployed by a student.

AI and ML
An assistant that helps a young person recognise unsafe situations online.

Web app
A weather forecasting site with live conditions for any location.
Fees
You settle each month separately, in the Hong Kong dollars printed on the card, which suits a contest plan that may change after the Heat. Where your payment method carries a gateway charge, it is shown before you confirm.
Free first class
Free
no card required
One to one
$1,200 HKD
a month, eight live classes
What families say
Parents' and students' Google reviews, shown as written.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
Olympiad C++ in Hong Kong
C++. HKOI's rules ask for solutions in C++20 and say not every task can be solved in Python, and in the 2025/26 Heat C++ entrants reached the Final far more often. Python is still a fine first language for a younger child.
The rules name C++20 for the Final. HKOI's Online Judge accepts C++14, C++17 and C++20. We teach C++17 as a base and add the C++20 features that help in contests.
No. HKOI is open only to registered day secondary schools in Hong Kong, which nominate their own students, and the organiser charges no fee. Ask the school's computer teacher.
No. We prepare students for the Heat and Final. Medals and any team selection are decided by HKOI, and only medallists invited to the Training Team may be selected for the IOI.
We write our own practice tasks and point students to HKOI's published past problems for official material. We do not reproduce the organiser's problems or solutions.
For a student who already programs a little, our 12-week plan covers the core. A beginner needs a few extra weeks of plain C++ first. Contest strength then grows with regular practice.
Yes. Every lesson is live and taught in English by mentors based in India. We do not teach in Cantonese or Mandarin.
Yes. In Hong Kong every C++ lesson is one to one, with the same coach each week.
Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. A 5:30 pm lesson in Hong Kong is 3 pm in India, all year round.
Monthly, in Hong Kong dollars, with no lump sum. Any payment-gateway charge is shown before you pay, and the first lesson is free.
Related
Pages on the contest, its junior group and the wider sport.
The Training Team and the contest year.
For younger secondary students.
What the written round tests.
Judges, contests and practice.
The international olympiad.
Every Hong Kong page.
Part of the guide: Every Hong Kong page
More guides: Coding and AI classes in Hong Kong · 中文:英文授課編程課程 · Start here: Online coding for kids · AI, vibe coding and AI agents: AI agents course · Coding subjects and courses: App development · By age and school level: Adults · HKDSE ICT and maths: DSE ICT elective guide · IB, IGCSE, A-level and SAT: A level Computer Science tutor · Guides for families: After-school coding · School holidays: AI summer course · Districts and areas: Causeway Bay
Start here
The coach sets a short contest-style task of our own, watches how your child approaches it, and tells you plainly where to start, whether that is plain C++, the library or algorithms.
Want the outline first? See Competitive Programming for Teens.
WhatsApp us · +91 91233 66161 · connect@modernagecoders.com
Live, online, one to one, in English, with coaches based in India. WhatsApp is fastest.
A priority demo is a full class of about 45 to 60 minutes. After the class the mentor sends a written skill report and a personal learning roadmap on WhatsApp. If you enrol, the demo fee is adjusted against your first month's fee. Share your demo Order ID with us on WhatsApp and we take it off.
Book a priority demo