vj1347 乘积最大

Vj1347 - /DP/f[i,k]ik/f[i,k]=f[j,k-1*num(j 1,i(k<=j<=i-1/k 0 int64 const maxk=6 maxn=40 base=10 maxp=100 type bignum=record l:integer

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //DP+¸ß¾«³Ë //f[i,k]±íʾǰi¸öÊý×ÖÌí¼Ók¸ö³ËºÅµÄ×î´ó³Ë»ý //f[i,k]=f[j,k-1]*num(j+1,i) (k<=j<=i-1) / //×¢Òâ¿´ÇåÊÇÌí¼Ók¸ö³ËºÅ //Ô¤´¦ÀíÌí¼Ó 0 ¸ö³ËºÅµÄֵʱºò×¢Òâ¸ß¾«Êǵ¹×Å´æµÄ / //´ËÌâÊý¾Ý²»³¬¹ý int64. .. / const maxk=6; maxn=40; base=10; maxp=100; type bignum=record l:integer; a:array[0. .maxp] of integer; end; var n,m:integer; s:string; f:array[0. .maxn,0. .maxk] of bignum; tmp:bignum; procedure init; begin readln(n,m); readln(s); end; function big(x,y:bignum):boolean; var i:integer; begin if x.l>y.l then exit(true); if x.l<y.l then exit(false); for i:=x.l downto 1 do begin if x.a[i]>y.a[i] then exit(true); if x.a[i]<y.a[i] then exit(false); end; exit(false); end; procedure mul(y:bignum; st:string);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
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.

Page1 / 2

Vj1347 - /DP/f[i,k]ik/f[i,k]=f[j,k-1*num(j 1,i(k<=j<=i-1/k 0 int64 const maxk=6 maxn=40 base=10 maxp=100 type bignum=record l:integer

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online