#pragma once #include #include #define R register int using namespace std; const int SP=500003; int trie[SP][26],pan[SP],ed[SP],re,t=1,n; char ch[55]; inline void add(char ch[]){ R a,i=0,p=1,m=strlen(ch); for(;i