Curriculum

23 modules in prerequisite order, all within the IOI Syllabus and sized to the current level in Libya.

L1 · Sabratha

Foundations: C++, the STL, complexity and sorting, up to prefix sums.

  1. F1

    C++ basics

    ⁦4⁩ weeks

    I/O, variables, conditions, loops, functions, arrays, strings

  2. F2

    Complexity

    1 week

    Big-O, 10⁸ operations per second, reading constraints, overflow

    Requires: F1

  3. F3

    STL

    ⁦2⁩ weeks

    vector, pair, sort, set/map, stack/queue

    Requires: F1

  4. F4

    Brute force and simulation

    ⁦2⁩ weeks

    Trying all cases, careful implementation

    Requires: F1

  5. F5

    Basic math

    ⁦2⁩ weeks

    Divisibility, gcd and lcm, primes and sieve, modular arithmetic

    Requires: F2

  6. F6

    Sorting

    ⁦2⁩ weeks

    Sorting as a tool, custom comparisons, counting

    Requires: F3

  7. F7

    Prefix sums

    ⁦3⁩ weeks

    1D and 2D prefix sums, difference arrays

    Requires: F2

L2 · Leptis

Algorithms: binary search, greedy and basic DP, up to BFS, DFS and Dijkstra.

  1. A1

    Binary search

    ⁦2⁩ weeks

    On sorted arrays and on the answer

    Requires: F6

  2. A2

    Two pointers

    1 week

    Sliding window

    Requires: F7

  3. A3

    Greedy

    ⁦2⁩ weeks

    Exchange argument, scheduling, when greedy fails

    Requires: F6

  4. A4

    Recursion

    ⁦2⁩ weeks

    Backtracking, subsets, permutations

    Requires: F1

  5. A5

    Basic DP

    ⁦4⁩ weeks

    1D DP, coins, grid paths, LIS O(n²), LCS

    Requires: A4

  6. A6

    BFS and DFS

    ⁦3⁩ weeks

    Graph representation, BFS, DFS, grids, connected components, unweighted shortest paths

    Requires: F3

  7. A7

    Dijkstra

    ⁦2⁩ weeks

    Weighted shortest paths with a priority_queue

    Requires: A6

  8. A8

    IOI task formats

    1 week

    Function-signature graders, interactive, output-only, subtasks

    Requires: F1

  9. A9

    Stress testing

    1 week

    Brute + generator + comparison, systematic debugging

    Requires: F4

L3 · Cyrene

Olympiad: DSU, segment trees, sparse tables, sqrt decomposition, knapsack and bitmask DP.

  1. O1

    DSU

    Union-find with path compression and union by size, connectivity queries

    Requires: A6

  2. O2

    Sparse table

    Range minimum and maximum in O(1) per query

    Requires: F7

  3. O3

    Segment tree

    Point update and range query (sum, min, max)

    Requires: F7, A4

  4. O4

    Sqrt decomposition

    Blocks of size sqrt(n) for range queries and updates

    Requires: F7

  5. O5

    Knapsack DP

    0/1 and unbounded knapsack, subset sum

    Requires: A5

  6. O6

    Bitmask DP

    Subsets as masks, DP over subsets for small n

    Requires: A5

  7. O7

    IOI strategy

    Mixed untagged problems, reading all three problems, harvesting subtasks, splitting 5 hours

    Requires: A8