vj1470 教主的花园

Vj1470 教主的花园

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

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //DP //f[i,1]ΪµÚi¸öλÖÃÖָ߶ÈΪ10µÄÊ÷µÄ×î´ó¹ÛÉͼÛÖµ //f[i,2]ΪµÚi¸öλÖÃÖָ߶ÈΪ20µÄÊ÷µÄ×î´ó¹ÛÉͼÛÖµ ²¢ÇÒËüµÄÇ°Ò»¸öλÖñÈËûÖÖµÄµÍ //f[i,3]ΪµÚi¸öλÖÃÖָ߶ÈΪ20µÄÊ÷µÄ×î´ó¹ÛÉͼÛÖµ ²¢ÇÒËüµÄÇ°Ò»¸öλÖñÈËûÖÖµÄ¸ß //f[i,4]ΪµÚi¸öλÖÃÖָ߶ÈΪ30µÄÊ÷µÄ×î´ó¹ÛÉͼÛÖµ //³õʼö¾ÙµÚÒ»¸öλÖÃÖÖÊ÷µÄ¸ß¶È ²¢ÇÒÔÚÕâ¸öλÖÃÉÏÆäËû¸ß¶ÈµÄ×îÓÅÖµ¶¼¸³¸ºÎÞÇî //f[1,1] ans=max(f[n,2],f[n,4]) //f[1,2] ans=max(ans,f[n,1]) //f[1,3] ans=max(ans,f[n,4]) //f[1,4] ans=max(ans,f[n,1],f[n,3]) / const maxn=100000; var n,ans:longint; a:array[0. .maxn,1. .4] of integer;
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

Vj1470 教主的花园

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