本文共 1071 字,大约阅读时间需要 3 分钟。
//#pragma comment(linker, "/STACK:102400000")#include #include #include #include #include #include #include #include #include #include #include #include #define tree int o,int l,int r#define lson o<<1,l,mid#define rson o<<1|1,mid+1,r#define lo o<<1#define ro o<<1|1#define pb push_back#define mp make_pair#define ULL unsigned long long#define LL long long#define inf 0x3fffffff//不要太大!溢出!#define eps 1e-7#define N 1009#define M 4#define mod 100000using namespace std;int m,n,T,t,x,y,u;int ch[N][4];int v[N];int f[N],last[N],num;char str[N];int d[N][N];void clear()//Trie树初始化{ memset(d,-1,sizeof(d)); num=1; memset(ch[0],0,sizeof(ch[0])); memset(v,0,sizeof(v)); memset(last,0,sizeof(last));}int idx(char c){ switch(c) { case 'A': return 0; case 'C': return 1; case 'G': return 2; case 'T': return 3; } return 0;}void insert(char str[],int value)//建Trie树{ int len=strlen(str); int u=0; for (int i=0; i
转载于:https://www.cnblogs.com/sbaof/p/3373765.html