/ Vijos / 讨论 / 过河 /

让人抓狂的结果……

评测结果
编译成功

测试数据 #0: WrongAnswer, time = 0 ms, mem = 880 KiB, score = 0
测试数据 #1: WrongAnswer, time = 0 ms, mem = 880 KiB, score = 0
测试数据 #2: WrongAnswer, time = 0 ms, mem = 876 KiB, score = 0
测试数据 #3: RuntimeError, time = 0 ms, mem = 880 KiB, score = 0
测试数据 #4: RuntimeError, time = 0 ms, mem = 876 KiB, score = 0
测试数据 #5: RuntimeError, time = 0 ms, mem = 880 KiB, score = 0
测试数据 #6: RuntimeError, time = 0 ms, mem = 880 KiB, score = 0
测试数据 #7: RuntimeError, time = 15 ms, mem = 880 KiB, score = 0
测试数据 #8: RuntimeError, time = 0 ms, mem = 876 KiB, score = 0
测试数据 #9: RuntimeError, time = 15 ms, mem = 880 KiB, score = 0
RuntimeError, time = 30 ms, mem = 880 KiB, score = 0
####代码
program across;
var
f:array[-100..11000] of longint;
stone:array[-100..11000] of 0..1;
stn:array[1..100] of longint;
s,t,m,l,i,min,x,j:longint;
begin
readln(l);
readln(s,t,m);
fillchar(stone,sizeof(stone),0);
for i:=1 to m do read(stn[i]);readln;
for i:=1 to m-1 do for j:=m downto i+1 do
if stn[i]>stn[j] then begin x:=stn[i];stn[i]:=stn[j];stn[j]:=x;end;
i:=0;j:=0;x:=0;
repeat
i:=i+1;
if stn[i]-j>100 then begin stn[i]:=j+100;x:=x+stn[i]-j-100;end;
j:=stn[i];stone[j]:=1;
until i=m;
l:=l-x;
fillchar(f,sizeof(f),0);
for i:=1 to s-1 do f[i]:=2147483647;
for i:=s to l do
begin
min:=2147483647;
for j:=s to t do if f[i-j]<min then min:=f[i-j];
f[i]:=stone[i]+min;
end;
writeln(f[l]);
end.
我要无语了,到底哪错了?求大神指教,不胜感激!

0 条评论

目前还没有评论...

信息

ID
1002
难度
7
分类
动态规划 点击显示
标签
递交数
25264
已通过
4390
通过率
17%
被复制
76
上传者