//http://contest-hunter.org:83/contest/0x18%E3%80%8C%E5%9F%BA%E6%9C%AC%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E3%80%8D%E7%BB%83%E4%B9%A0/1801%20%E6%8B%AC%E5%8F%B7%E7%94%BB%E5%AE%B6 #include #include #include #include using namespace std; const int maxn=100005; char s[maxn],hsh[128]; int n,p,res=0; void Match() { stack stk; int done=0; #define EXIT { res=max(res,done); return; } while(p