- 小胖办证
- 2009-07-16 14:14:45 @
自认思路清晰,方法正确了!
后4个测试数据两个输出0,两个比标准答案长,麻烦帮忙看看大牛!
program P1139;
var i,j,n,m:longint;
a,x,y:array[0..101,0..501] of longint;
f:array[0..101,0..501] of int64;
b:array[0..50000] of longint;
procedure work;
var i,j:longint;
begin
for i:=2 to m do
begin
for j:=1 to n do
begin
f:=f+a;
x:=i-1;
y:=j;
end;
for j:=2 to n do
if f>f+a then
begin
f:=f+a;
x:=i;
y:=j-1;
end;
for j:=n-1 downto 1 do
if f>f+a then
begin
f:=f+a;
x:=i;
y:=j+1;
end;
end;
end;
procedure print;
var x1,y1,i,j,k:longint;
min:int64;
begin
min:=1000000000;
for j:=1 to n do
if f[m,j]
1 条评论
-
luoruotian LV 8 @ 2009-09-23 22:02:23
嘿嘿,我不是大神,所以跳过
老子只是最后两个出错嘿嘿。
- 1