08
                    
2017-08
            2017-08
                UVALive 7648 Passwords (AC自动机 + DP)
                        题意:~
思路:
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
template <class T> inline bool scan_d(T &ret) {char c; int sgn;if(c=getchar(),c==EOF...                    
 
            
                
                    08月08日
                    4,175
                
                
                
                    22
                    
2016-09
            2016-09
                HDU 5880 Family View (AC自动机)
                        题目链接:点我~~
题意:敏感词屏蔽,给一堆敏感词,给一段文本,要求把文本中所有的敏感词用*代替。
思路:对敏感词建出AC自动机,在AC自动机上跑文本,可以得到每个前缀的最长匹配后缀,再将每一匹配到的段标记,最后再扫一遍输出。
#include <bits/stdc++.h>
using namespace std;
typedef long...                    
 
            
                
                    09月22日
                    2,818
                
                
                