"""
Exercise 2: Corporate Flight Bookings (LeetCode 1109) - difference array

bookings[i] = [first, last, seats] (1-indexed, inclusive). Return the total
seats per flight 1..n using a difference array: diff[first-1] += seats,
diff[last] -= seats, then one prefix-sum pass.
"""

def corp_flight_bookings(bookings, n):
    # TODO
    return [0] * n


# --- self-check: do not modify below this line ---
a = corp_flight_bookings([[1, 2, 10], [2, 3, 20], [2, 5, 25]], 5)
b = corp_flight_bookings([[1, 2, 10], [2, 2, 15]], 2)
print(a, b)
print("PASS" if a == [10, 55, 45, 25, 25] and b == [10, 25] else "FAIL")
