- 最小总代价
- 2009-08-17 21:00:01 @
用DP做的但怎么都是90分,不晓得哪做了》
type
air=record
zh:int64;
ex:array[1..16] of integer;
end;
var
f:array[1..16] of array[1..16] of air;
n,a1,a2,a3,wei:longint;
x:array[1..16,1..16] of longint;
min:int64;
begin
readln(n);
for a1:=1 to n do begin for a2:=1 to n do read(x[a1,a2]); readln; end;
for a1:=2 to n do
for a2:=1 to n do
begin
min:=999999999999999;
for a3:=1 to n do
if (f[a1-1][a3].ex[a2]=0)and(a3a2) then
if (f[a1-1][a3].zh+x[a3,a2])
0 条评论
目前还没有评论...