#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
using namespace std;
int cmp(int a,int b)
{
return a>b;
}
int main()
{
int a[200],i;
int num,geshu,day,lasttime,endtime;
scanf("%d",&num);
while(num--)
{
int t;
scanf("%d",&t);
memset(a,0,sizeof(a));
while(t--)
{
scanf("%d%d%d",&geshu,&day,&lasttime);
endtime=day+lasttime;
for(i=day;i<endtime;i++)
{
a[i]+=geshu;
}
}
sort(a,a+190,cmp);
printf("%d\n",a[0]);
}
}
时间: 2024-10-11 14:44:09