問題一覧 > 通常問題

No.1643 Not Substring

レベル : / AI推定難易度 : 550 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 272
作問者 : 蜜蜂 / テスター : Mitarushi ygussany
お気に入りにしたユーザー ProblemId : 5562 / 自分の提出
問題文最終更新日: 2021-08-01 11:24:03
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 309 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。