Editorial for LCC/Moose '19 Contest 1 J3 - Emily and Timetable


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.

Author: Riolku

A simple solution is; for every MCPT meeting, search for a conflicting school event.

However, this is much too slow.


Instead, we should use a set of the school events and for each meeting check for a conflict by searching the set, which is much faster.

In python, the required data structure is the builtin set.


Comments

There are no comments at the moment.