摘要: #include #define MAX 200int main( ){ int n,i,j,a[MAX][MAX]={0}; scanf("%d",&n); for ( i=0; i#define MAX 200int main( ){ int m,n,i,j,a[MAX][MAX]={0}; s... 阅读全文
posted @ 2014-08-17 15:30 2014acm 阅读(105) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;#define MAX 200int dp[MAX][MAX];int f(int M,int N){ if(M>m>>n) { f(m,n); coutusing namespace std;#def... 阅读全文
posted @ 2014-08-17 13:13 2014acm 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 递归#include using namespace std;int f(int a,int b){if(a>m>>n)cout using namespace std;int f(int a,int b) { if(b==0) return 1 ; if(a>m>>n) cout<<f(m,n)... 阅读全文
posted @ 2014-08-17 11:26 2014acm 阅读(226) 评论(0) 推荐(0) 编辑
摘要: // poj 1458 zoj 1733 最长公共子序列 DP #include #include #define N 1005using namespace std ;char s1[N],s2[N]; int dp[N][N];int max(int a,int b) { return a>b ... 阅读全文
posted @ 2014-08-17 11:10 2014acm 阅读(113) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;#include#define N 1005char s1[N],s2[N];int dp[N][N];int max(int a,int b) { return a>b ? a:b ;}int f(int x ,int y){if(dp[x... 阅读全文
posted @ 2014-08-17 10:48 2014acm 阅读(130) 评论(0) 推荐(0) 编辑