摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=1181一开始忘记 回溯了。。简单的dfs 只要把每个字符串的第一个和最后一个处理一下 就可以 了#include<iostream>#include<string.h>#include<cstdio>#include<vector>using namespace std;vector <int> p[30];char s[1000002];int flag;void dfs(int n){ int w,i; w=p[n].size(); for(i= 阅读全文