Not complicated at all with only a few constraints like your example above - someone could throw together a crude implementation/simple UI of that specific scenario in an hour. Building something more flexible to let you programmatically generate various scenarios with varying inputs would take longer and the more constraints, the more complex it gets unsurprisingly. At the absolute upper end of the complexity spectrum,
Abl Schools is tackling the Master Schedule.