测评机: Xeost[5]
得分: 88分
提交日期: 2009-5-12 22:26:00
有效耗时: 502毫秒
测试结果1: 通过本测试点|有效耗时172ms
测试结果2: 测试结果错误.错误结果为:5166000
正确结果应为:516600
测试结果3: 通过本测试点|有效耗时47ms
测试结果4: 通过本测试点|有效耗时47ms
测试结果5: 通过本测试点|有效耗时63ms
测试结果6: 通过本测试点|有效耗时63ms
测试结果7: 通过本测试点|有效耗时63ms
测试结果8: 通过本测试点|有效耗时47ms
提交代码: program rq311(input,output);
var i,j,k,l,n,p :longint;
st,str :string;
a :array [1..50,1..50] of qword;
f :array [1..50,0..50] of qword;
function max(a,b :qword) :qword;
begin
if a>b then max:=a
else max:=b;
end;
begin
readln(n,p);
read(str);
for i:=1 to n do
for j:=i to n do
begin
st:=copy(str,i,j-i+1);
l:=j-i+1;
val(st,a[i,j],l);
end;
for i:=1 to n do
f[i,0]:=a[1,i];
for i:=1 to p do
for j:=i+1 to n do
for k:=1 to j-1 do
f[j,i]:=max(f[k,i-1]*a[k+1,j],f[j,i]);
write(f[n,p]);
end.
怪事!有那么多人都是这个点不过得88,结果都是多了个0,为什么呢?谁来解释一下。
----absi2011 这题数据已经处理过了,不要再反复挖坟了哦~