solve :: (Ord a) => [(a, a)] -> [a]
solve =
  let f [] (start, end) = end : []
      f acc@(h:_) (start, end)
        | start <= h = acc
        | otherwise = end : acc
  in (foldl' f []) . (sortBy hourOrder)
solve :: (Ord a) => [(a, a)] -> [a]
solve =
  let f [] (start, end) = end : []
      f acc@(h:_) (start, end)
        | start <= h = acc
        | otherwise = end : acc
  in (foldl' f []) . (sortBy hourOrder)
solve =
  let f [] (start, end) = end : []
      f acc@(h:_) (start, end)
        | start <= h = acc
        | otherwise = end : acc
  in (foldl' f []) . (sortBy hourOrder)