vj1159 岳麓山上打æ°&

Vj1159 岳麓山上打æ°&

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

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //ÎÞÏÞ±³°ü //f[j]=min(f[j-k*a[i]]+1) //¼Ç¼×îС·¾¶Ê± ±È½ÏºÃµÄ´¦Àí·½·¨ÊÇÏÈ°ÑˮͰ°´Ìå»ý½µÐòÅÅÁÐ ÕâÑùÒ»¸ö·¾¶¾ÍÊÇ°´Ë®Í °Ìå»ý½µÐòÅÅÁÐµÄ ¾Í¿ÉÒÔµ¹×ÅÅжÏ×îС·¾¶ÁË Í¬Ê±Êä³öÒ²·½±ãÁË ° const maxn=100; maxv=20000; var n,v:integer; a:array[0. .maxn] of integer; f,path,node:array[0. .maxv] of integer; procedure init; var i:integer; begin readln(v); readln(n); for i:=1 to n do readln(a[i]); end; function check(x,y:integer):boolean; begin while x>0 do begin if node[x]<node[y] then exit(true); if node[x]>node[y] then exit(false);
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

Vj1159 岳麓山上打æ°&

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