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 |
几点参考意见,的确是很好的DP练习题目for(i=1;i<=lena;i++) for(j=1;j<=lenb;j++) { if(f[i-1][j]&&a[i]==c[i+j]||f[i][j-1]&&b[j]==c[i+j]) f[i][j]=true; else f[i][j]=false; } 注意初始化操作. 可惜我也是参考别人的意见才作出来的啊,何时才能学懂DP啊 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator