28 lines
492 B
C++
28 lines
492 B
C++
// #include "../../debugging.h"
|
|
#include <algorithm>
|
|
#include <cstdio>
|
|
#include <iostream>
|
|
#include <vector>
|
|
using namespace std;
|
|
|
|
int main() {
|
|
freopen("blist.in", "r", stdin);
|
|
freopen("blist.out", "w", stdout);
|
|
|
|
int n, res = 0;
|
|
cin >> n;
|
|
|
|
vector<int> bucketsAtTimeT(1000);
|
|
for (int i = 0; i < n; i++) {
|
|
int s, t, b;
|
|
cin >> s >> t >> b;
|
|
|
|
for (int j = s; j <= t; j++) {
|
|
bucketsAtTimeT[j] += b;
|
|
res = max(res, bucketsAtTimeT[j]);
|
|
}
|
|
}
|
|
|
|
cout << res;
|
|
}
|