| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
俺叫大飞,下面是我用一维数组和pre变量实现滚动数组的功能。 for(m=0;m<L;m++)
{
pre=0;
for(n=0;n<L;n++)
{
if(c[m]==c[L-1-n])
max=pre+1;
else
max=LCS[n+1]>LCS[n]?LCS[n+1]:LCS[n];
pre=LCS[n+1];
LCS[n+1]=max;
}
}
希望大牛能够指点下。
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator