其他OA #17
Most Unique Elements (Part 1 :)
估计简单可在线判题
Select the least concentrated strings by the ratio of each string's highest character frequency, then keep only the characters that appear only in the selected set. The source's only example determines the return rule; this site adds the input protocol.
输入格式
The first line contains n (1≤n≤1000), followed by n lines of non-empty strings containing only lowercase English letters, each of length 1..1000.
输出格式
First select all strings with the smallest ratio of the most common character; output the characters in these strings that do not appear in any unselected string, keeping repeated characters in the original input order of the selected strings and their order within each string.
样例 1
输入:
3
aba
ab
abbcdd
输出:
cdd
样例 2
输入:
3
aab
cc
bbd
输出:
aabbbd
样例 3
输入:
2
abca
de
输出:
abcade