class Solution {
public:
vector<int> corpFlightBookings(vector<vector<int>>& bookings, int n) {
vector<int> counters(n, 0);
for (const auto& booking : bookings) {
counters[booking[0] - 1] += booking[2];
if (booking[1] < n)
counters[booking[1]] -= booking[2];
}
for (int i = 1; i < n; i++) {
counters[i] += counters[i - 1];
}
return counters;
}
};