摘要:
/*最长上升子序列*//*输入:54 2 3 1 5输出:3*/#include#define MAX_N 100#define max(x, y) x>y?x:yusing namespace std;int n;int a[MAX_N];int dp[MAX_N];void LIS(){ int res = 1; for(int i = 0; i >n; for(int i = 0; i >a[i]; LIS(); system("PAUSE"); return 0;} 阅读全文