摘要:
略微简单的动态规划只是简单贴代码就好了。#include #include int dp[100007][11];int ans[100007][11];int n,N;inline int Max(int x,int c){ return x>c?x:c;}int v[16];void DP(){ int i,j; memset(v,0,sizeof(v)); memset(ans,0,sizeof(ans)); v[5]=v[4]=v[6]=1; int len = 2; for(i=1;i=0 &&v[j-1]){ ...
阅读全文