#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct node{
int num, begin, days;
} arr;
int arrTime[200];
int main(){
int t, n, i, n0;
scanf("%d", &t);
while(t--){
scanf("%d", &n);
n0 = n;
memset(arrTime, 0, sizeof(arrTime));
while(n--){
scanf("%d%d%d", &arr.num, &arr.begin, &arr.days);
arr.days += arr.begin;
for(i = arr.begin; i < arr.days; ++i)
arrTime[i] += arr.num;
}
printf("%d\n", *max_element(arrTime, arrTime + 200));
}
return 0;
}
799499 | 长木 | 房间安排 | Accepted | 204 | 232 | C/C++ | 04-06 21:18:20 |