#include #include #include using namespace std; map litere; map words; int main() { char litera; string cuvant; for (int i = 0; i < 26; i++) { cin >> litera >> cuvant; litere[litera] = cuvant; } int maxim = 0; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> cuvant; string empty = ""; for (int j = 0; j < cuvant.size(); j++) { empty += litere[cuvant[j]]; } //cout << empty << "\n"; OK SO FAR if (words.find(empty) != words.end()) { words[empty]++; if (words[empty] > maxim) { maxim = words[empty]; } } else { words[empty] = 1; } } cout << maxim; }