摘要:
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>#define N 10010using namespace std;int dep[N],farther[N],vi[N],sec[N],Md,index[N],e,set[N];struct Edge{ int to,next;}edge[N];void addedge(int from,int to){ edge[e].to=to; edge[e].next=i 阅读全文
摘要:
此题的题意很明确,就是求最长公共子序列;#include<iostream>#include<algorithm>#include<cstdio>#include<cstring>#include<queue>using namespace std;int dp[2010][2010];int hash[255];int main(){ char str[2010],ter[2010],fir[2010]; int n,i,j; while(scanf("%d",&n)!=EOF) { memset(has 阅读全文