vj1143 &auml;&cedil;‰&aring;–&aelig;–&sup1;&aelig;&nbsp;&frac14;&aelig;•&deg;

Vj1143 ä¸‰å–æ–¹æ ¼æ•°

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

//±ÉÈËµÄ·½·¨ //¶à½ø³Ì dp //Éè f[ x1 , x2 , x3 , step ] ÎªÈý¸öÈËºá×ø±ê·Ö±ðÎª x1 , x2 , x3 Ã¿¸öÈË¶¼×ßÁË step µÄ×îÓÅÈ¡ÖµÇé¿ö //ÒòÎªÖªµÀÁË step ºÍ x ËùÒÔ¿ÉÒÔËã³öËûÃÇµÄ y ÕâÈý¸öµãÃ¿¸öµã¶¼ÓÐÁ½ÖÖÇé¿ö×ªÒÆÀ´ Èý¸öµã¹² 8 ÖÖ×éºÏÇé¿ö //f[x1,x2,x3,step]=f[ x1+d[i] , x2+d[j] , x3+d[k] , step-1 ] + sum sumÎªÈý¸öÈËµ±Ç°Ò»²½È¡µÃµÄ×ÜºÍ s const maxn=40; d:array[1. .2] of integer=(0,-1); var n:integer; g:array[0. .maxn,0. .maxn] of integer; f:array[0. .maxn,0. .maxn,0. .maxn,0. .2*maxn] of integer; procedure init; var i,j:integer; begin readln(n); for i:=1 to n do for j:=1 to n do read(g[i,j]); end; procedure main; var

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

View Full Document
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

Vj1143 ä¸‰å–æ–¹æ ¼æ•°

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

View Full Document
Ask a homework question - tutors are online