摘要:
Link dp[i]: 以a[1][i]结尾的最长公共子序列长度 dp[i]=dp[j]+1(1<=j<=i-1) 只需满足a[1][j]这个值在每个排列中都在a[1][i]这个值的前面 ##code #include<bits/stdc++.h> using namespace std; type 阅读全文
摘要:
Link 考虑最多几个不用移动 很容易想到最长非严格递增子序列不动 答案就是n-LIS ##code #include<bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back const int N 阅读全文
摘要:
Link 一个小模拟 愣是写了一个钟头... 先上代码 再说启示 Code #include<bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back const int N = 10000; int 阅读全文