vj1417 魔塔防御

Vj1417 魔塔防御

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

View Full Document Right Arrow Icon
//´óÅ£µÄºÃ·½·¨ //·ÖÎö¿ÉÖª ºì·¨Ê¦Ò»¶¨ÊÇ×îºóÑ¡ ËùÒÔ¶ÔÓÚ Ñ¡ i ¸öÂÌ·¨Ê¦ j ¸öÀ¶·¨Ê¦ ×ܹ² i+j ¸öÀ¶ÂÌ·¨Ê¦µÄ×îÓÅֵѡÔñ //Ö»ÓÐÁ½ÖÖÇé¿ö : µÚ i+j ¸ö·¨Ê¦ÊÇÂÌ·¨Ê¦ µÚ i+j ¸ö·¨Ê¦ÊÇÀ¶·¨Ê¦ ËùÒԿɵ÷½³Ì //f[ i , j ] = max ( f[ i-1 ,j ] + (i-1)*g*(j*b+t) , f[i,j-1]+i*g*((j-1)*b+t ) / //×¢ÒâÑ»·±äÁ¿Òª¿ªµ½ longword » const maxn=1024; var n,r,g,b,t:longint;
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