Subtask 1
Loop all triples (train j from Zurich, train k from Lugano, Tunnel i) and check if the two trains crash in the tunnel. We can do this check in O(1) time as shown below, so this takes O(nmt) time in total