303976: CF765B. Code obfuscation
Memory Limit:512 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Code obfuscation
题意翻译
给你一个字符串,然后把它变成另一个字符串,如果第一个出现的字符就把他变成a,第二个就变成b,以此类推,现告诉你转换后的字符串,问你是否有可能由其他字符串转换过来 翻译贡献者UID:71371题目描述
Kostya likes Codeforces contests very much. However, he is very disappointed that his solutions are frequently hacked. That's why he decided to obfuscate (intentionally make less readable) his code before upcoming contest. To obfuscate the code, Kostya first looks at the first variable name used in his program and replaces all its occurrences with a single symbol $ a $ , then he looks at the second variable name that has not been replaced yet, and replaces all its occurrences with $ b $ , and so on. Kostya is well-mannered, so he doesn't use any one-letter names before obfuscation. Moreover, there are at most 26 unique identifiers in his programs. You are given a list of identifiers of some program with removed spaces and line breaks. Check if this program can be a result of Kostya's obfuscation.输入输出格式
输入格式
In the only line of input there is a string $ S $ of lowercase English letters ( $ 1<=|S|<=500 $ ) — the identifiers of a program with removed whitespace characters.
输出格式
If this program can be a result of Kostya's obfuscation, print "YES" (without quotes), otherwise print "NO".
输入输出样例
输入样例 #1
abacaba
输出样例 #1
YES
输入样例 #2
jinotega
输出样例 #2
NO