Skip to content
Tristan Penman edited this page Jun 17, 2019 · 5 revisions

Melbourne C++ Olympiad

Some intro goes here...

Some Topics / Challenges

Just some brainstorming for now...

2D Convex hull

Given a set of points, the convex hull is the minimal subset of points that fully encloses all of those points.

The challenge is, given a file that contains a list of 2D points, each on a separate line and in no particular order, find the convex hull of those points. The output does not need to be in any particular order.

Bonus points: order the points such that they form a line loop (i.e. the convex hull could be drawn P1 -> P2 -> P3 -> ... -> P1 with no lines overlapping).

Find intersection of two lists

Given two files, each containing a list of strings, in no particular order, find the list of strings that occur in both files. The output does not need to be in any particular order.

Count occurrences of integers in a file

A file contains a large number of unsigned integers, but with many duplicates. The list is in no particular order. Count the number of occurrences of each integer, and write that to a file. The output does not need to be in any particular order.

Bonus points: Output sorted by number of occurrences, descending, with ties broken by size of the corresponding integer.

Twists: The input is larger than what will fit in RAM.