为什么第三个点过不去?

哪位帮忙看下程序,为什么第三个点程序输出比正确答案长、、、、、

program shuishoubutie;

var

num:array[0..10000]of longint;

w,sum,i,hope,a,b,loc,j,n,ben,ttt,d2,top,d1,point:longint;

procedure findmax(bt:longint;var loc:longint);

var max,i:longint;f:array[1..10000]of longint;

begin

f[1]:=num[1]*(1+bt);

for i:=2 to top do

begin

f[i]:=num[i]*(i+bt);

if f[i]=f then

if (i=top)or(num*(i+1+bt)point then point:=a;

end; readln(d2); d1:=0;

if ttt=1 then d1:=(num[0]-num[point-ben])div (point-ben) else

for i:=1 to point do

begin if num[i]0 then for j:=i+1 to point do

if num[j]0 then begin d1:=(num[i]-num[j])div(j-i);break end;

if d10 then break end;

i:=1;while num[i]=0 do inc(i);if i=1 then num[i]:=num[0]-d1 else

for j:=i-1 downto 1 do num[j]:=num[j+1]+d1;

for j:=i+1 to point-ben do if num[j]=0 then

num[j]:=num[j-1]-d1;

for j:=point-ben+1 to 5000 do

begin

if num[j-1]-d2top)or(hopehope then

begin

a:=num[loc]*(loc+ben)-num[loc-1]*(loc+ben-1);

b:=num[loc]*(loc+ben+1)-num[loc-1]*(loc+ben);

if b

3 条评论

  • @ 2015-02-12 23:13:15

    kan bu understand.
    ——C++党路过

  • @ 2014-10-23 21:50:12

    C++党路过

  • @ 2009-08-29 18:37:50

    rp

    too long

    kan bu understand.

  • 1

信息

ID
1346
难度
6
分类
其他 | 数学 点击显示
标签
递交数
1035
已通过
276
通过率
27%
被复制
18
上传者