vj1474 雷曼兔


Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //DP //f[i]=max(f[j]+cost(i,j)) / const maxn=50; var n:integer; num:array[0. .maxn*maxn,0. .1] of integer; f:array[0. .maxn*maxn] of longint; function max(x,y:longint):longint; begin if x>=y then exit(x) else exit(y); end; procedure init; var i,j,x:integer; begin readln(n); for i:=1 to n do for j:=1 to n do begin read(x); num[x,0]:=i; num[x,1]:=j;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

Ask a homework question - tutors are online