No.1643 Not Substring
Problem Statement
A string obtained by removing $0$ or more characters from a string $X$ and arranging the remaining characters in their original order is called a subsequence of $X$.
For example, (空文字列), i, and mx are subsequences of mix, but z and xm are not subsequences of mix.
Among the strings consisting only of lowercase English letters that are not subsequences of the string $S$, output the lexicographically smallest one.
Input
$S$
- The length of $S$ is between $1$ and $100$, inclusive.
- $S$ consists only of lowercase English letters.
Output
Among the strings consisting only of lowercase English letters that are not subsequences of the string $S$, output the lexicographically smallest one.
Print a newline at the end.
Sample
Sample 1
Input
abcde
Output
aa
For example, a is a subsequence of abcde.
Sample 2
Input
aaaaaaa
Output
aaaaaaaa
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
蜜蜂