。。总是WA3个点....求神犇。。。

能不能求到数据调下?谢谢。。。。

或者神犇帮忙看下代码的问题。。。。

十分感谢。。。。

type

pp=record

point,site:longint;

end;

var

q:array [1..5,1..500000] of pp;

head,tail:array [1..5] of longint;

n,i,j,k,t,m,l,movetime:longint;

mac:array [1..5,1..100000] of longint;

sum:array [1..5,0..100000] of longint;

f,g:array [0..100000,1..5] of longint;

procedure init;

begin

readln(m,n,movetime,l);

for i:=1 to n do

begin

for j:=1 to m do

read(mac);

readln;

end;

for i:=1 to n do

begin

for j:=1 to m do

sum:=sum+mac;

end;

end;

function ef(point,x:longint):longint;

var

l,h,mid:longint;

begin

l:=head[x];h:=tail[x];

while lpoint then h:=mid-1

else

if q[x,mid].pointb then exit(b);exit(a);

end;

procedure main;

var

i,j,k,temp:longint;

begin

for i:=1 to n do

begin

head[i]:=1;tail[i]:=1;q.point:=0;q.site:=0;

end;

for i:=1 to m do

begin

for j:=1 to n do

begin

g:=maxlongint;

for k:=1 to n do

if kj then

g:=min(f+mac[j,i]+movetime,g);

insert(g-sum[j,i],j,i);

end;

for j:=1 to n do

begin

while i-q[j,head[j]].site>=l do inc(head[j]);

temp:=q[j,head[j]].point;

f:=temp+sum[j,i];

end;

end;

temp:=maxlongint;

for i:=1 to n do

if f[m,i]

3 条评论

  • @ 2012-10-18 23:51:19

    还真有这样的ID啊。。。跪

    ORZ。。。。

  • @ 2012-10-18 22:30:23

    求我干啥

    RT

  • @ 2012-10-18 20:04:03

    我错了....大家请无视该贴

    TUT。。

  • 1

信息

ID
1243
难度
8
分类
动态规划 | 单调性DP 点击显示
标签
(无)
递交数
2574
已通过
360
通过率
14%
被复制
4
上传者