题目地址:http://poj.org/problem?id=2127 Description You are given two sequences of integer numbers. Write a program to determine their common increasing subsequence of maximal possible length. Sequence S1 , S2 , . . . , SN of length N is called an increa…
#include <iostream> #define MAXN 501 using namespace std; int a[MAXN],b[MAXN],ans[MAXN]; int GCIS(int l1, int *a, int l2, int *b); int main() { //freopen("acm.acm","r",stdin); int l_1; int l_2; int i; int j; int ans_max; // cin&g…
You are given two sequences of integer numbers. Write a program to determine their common increasing subsequence of maximal possible length. Sequence S1, S2, ..., SN of length N is called an increasing subsequence of a sequence A1, A2, ..., AM of len…