求大牛们帮忙!!

program sqfgs;

var a:array[-1..20,-1..20] of longint;

f:array[-1..40,-1..20,-1..20,-1..20] of integer;

i,l,k,m,n,x1,x2,x3,y1,y2,y3,temp:longint;

function max(x11,x12,x13,x4,x5,x6,x7,x8:integer):integer;

var maxn:longint;

begin

maxn:=0;

if x11>maxn then maxn:=x11;

if x12>maxn then maxn:=x12;

if x13>maxn then maxn:=x13;

if x4>maxn then maxn:=x4;

if x5>maxn then maxn:=x5;

if x6>maxn then maxn:=x6;

if x7>maxn then maxn:=x7;

if x8>maxn then maxn:=x8;

exit(maxn);

end;

begin

readln(n);

for i:=1 to n do

for l:=1 to n do

read(a);

for k:=1 to 2*n-1 do

for x1:=1 to n do

for x2:=x1 to n do

for x3:=x2 to n do

begin

y1:=k+1-x1; y2:=k+1-x2; y3:=k+1-x3;

if (x1

1 条评论

  • @ 2009-08-11 18:38:56

    你的程序!

    if (x1=x2) and (x2=x3) then temp:=a[x1,y1];

    if (x1=x2) and (x2x3) then temp:=a[x1,y1]+a[x3,y3];

    if (x1x2) and (x2=x3) then temp:=a[x1,y1]+a[x3,y3];

    if (x1x2) and (x2x3) then temp:=a[x1,y1]+a[x2,y2]+a[x3,y3];

    if (x1=x3) and (x1x2) then temp:=a[x1,y1]+a[x2,y2];

    if (x1x3) and (x3=x2) then temp:=a[x1,y1]+a[x2,y2];

    你少了两句!

  • 1

信息

ID
1143
难度
4
分类
动态规划 点击显示
标签
递交数
3533
已通过
1458
通过率
41%
被复制
9
上传者