标签:
#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]);
}
}
标签:
原文地址:http://www.cnblogs.com/mycapple-zgs-111411/p/4619717.html