Write corp_flight_bookings(bookings: list[list[int]], n: int) -> list[int].
There are n flights numbered 1 to n. Each booking [first, last, seats] reserves seats seats on every flight from first to last inclusive. Return a list of length n whose i-th entry (0-based) is the total seats reserved on flight i + 1.
Example: bookings = [[1, 2, 10], [2, 4, 5], [3, 3, 7]], n = 4 gives [10, 15, 12, 5].
With no bookings, every total is 0.
Constraints: 1 <= n <= 2 * 10^4, up to 2 * 10^4 bookings, 1 <= first <= last <= n, 1 <= seats <= 10^4.
Adding seats to every flight in the range is O(n) per booking, so O(n·q) overall, and fails the large test. Aim for O(n + q).
Show hint
record only where each booking starts and where it stops applying, then recover every flight's total in one left-to-right pass.