Http://codeforces.com/contest/278/problem/ B
/** Question: Number of strings: N 1 ≤ n ≤ 30. The length of each string cannot exceed 20 * There are 676 types of strings containing two characters, greater than 600, * So the strings of its substrings are generated in two places. * Thank you... */
# Include <iostream> # include <cstdio> # include <string> # include <cstring> using namespace STD; char STR [22]; bool s [26], ss [26] [26]; // when the storage result is a letter or two letters, int main () {int N; CIN> N; while (n --) {CIN> STR; For (INT I = 0; I <strlen (STR)-1; I ++) {s [STR [I]-'a'] = true; ss [STR [I]-'a'] [STR [I + 1]-'a'] = true;} s [STR [strlen (STR) -1]-'a'] = true;} For (INT I = 0; I <26; I ++) // case of a letter {If (! S [I]) {printf ("% C \ n", I + 'A'); Return 0 ;}} for (INT I = 0; I <26; I ++) // case of two letters {for (Int J = 0; j <26; j ++) {If (! Ss [I] [J]) {printf ("% C \ n", I + 'A', J + 'A'); Return 0 ;}}}}