#include #include #include using namespace std; struct elem { char c; char code[10]; }; //ifstream fin("morse.in"); elem v[10000]; char s[100]; char w[10000][10001]; char sz[10000][10001]; int n; int main() { for(int i=1;i<=26;i++) { cin.getline(s,100); v[i].c=s[0]; strcpy(s,s+2); strcpy(v[i].code,s); } //for(int i=1;i<=26;i++) // cout<>n; for(int i=1;i<=n;i++) cin>>w[i]; for(int i=1;i<=n;i++) { char cuv[10001]; cuv[0]=0; for(int j=0;w[i][j]!=0;j++) strcat(cuv,v[(int)w[i][j]-(int)('a')+1].code); strcpy(sz[i],cuv); //cout<maxi) maxi=szam; } */ for(int i=1;i0) { char aux[10001]; strcpy(aux,sz[i]); strcpy(sz[i],sz[j]); strcpy(sz[j],aux); } int szamlalo=1; for(int i=2;i<=n;i++) if(strcmp(sz[i],sz[i-1])==0) szamlalo++; else if(szamlalo>2) { if(szamlalo>maxi) maxi=szamlalo; szamlalo=1; } cout<