Current work
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// #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;
|
||||
}
|
||||
Reference in New Issue
Block a user