- GF
- 2009-06-11 15:50:13 @
var n,i,j,k,tm,max,aa,bb:integer;
a,b,c:array[0..100]of integer;
f,t:Array[0..100,0..100,0..1500]of integer;
begin
assign(input,'in.txt');
reset(input);
readln(n);
for i:=1 to n do
readln(a[i],b[i],c[i]);
readln(aa,bb);
max:=0;
tm:=maxint;
for i:=1 to n do
for j:=a[i] to aa do
for k:=b[i] to bb do
begin
t:=t;
f:=f;
if f+1>f then
begin
f:=f+1;
t:=t+c[i];
end else if( f+1=f)and
(t+c[i]max then
begin
max:=f;
tm:=t;
end else if (f=max)and(t
0 条评论
目前还没有评论...