vj1312 能量项链

Vj1312 能量项链

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

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //DP //f[i,j]=f[i,k]+f[k+1,j]+a[i]*a[k+1]*a[j+1] //³õÖµf[i,i]=0 / //±ÉÈ˵ÄÎÊÌâ //лñµÃÄÜÁ¿Çó´íÁË //Ó¦¸ÃÄ£ÄâÒ»°ãÇé¿ö¿´ лñµÃµÄÄÜÁ¿ÊÇÄļ¸¸ö³Ë»ý / const maxn=200; var n,ans:longint; a:array[0. .maxn] of integer; f:array[0. .maxn,0. .maxn] of longint; function max(x,y:longint):longint; begin if x>=y then exit(x) else exit(y); end; procedure init; var
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