博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Code obfuscation
阅读量:4451 次
发布时间:2019-06-07

本文共 1528 字,大约阅读时间需要 5 分钟。

Description

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.

Input

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.

Output

If this program can be a result of Kostya's obfuscation, print "YES" (without quotes), otherwise print "NO".

Sample Input

Input

abacaba

Output

YES

Input

jinotega

Output

NO
题目大意:给出一个字符串,每一个字母都要小于等于前面的最大值加一,否则输出NO(第一个必须是a)
#include 
#include
int main(){ char e[1000]; int i,p=0,max,x; while(gets(e)) { x=0; p=strlen(e); if(e[0]!='a') { printf("NO\n"); continue; } max=e[0]; for(i=0;i

 

转载于:https://www.cnblogs.com/zcy19990813/p/9702830.html

你可能感兴趣的文章
Jenkins配置备份恢复插件ThinBackup
查看>>
Dockerfile 构建前端node应用cnpm命令启动nodejs服务
查看>>
OpenWRT中的按键和灯的GPIO控制实现_转
查看>>
进度管理中的常见问题
查看>>
POJ 3083 -- Children of the Candy Corn(DFS+BFS)TLE
查看>>
linux运行级别
查看>>
工资调整
查看>>
记:Android 安装apk的代码实现
查看>>
xml弹出框js备份
查看>>
省份二级联动
查看>>
使用Vue时localhost:8080中localhost换成ip地址后无法显示页面的问题
查看>>
PHP 【五】
查看>>
HDU 1241 Oil Deposits
查看>>
POJ 2392 Space Elevator
查看>>
2981:大整数加法-poj
查看>>
hdu Piggy-Bank
查看>>
括号配对nyoj2(疑问)
查看>>
JS中的函数声明错误
查看>>
自我介绍
查看>>
一、harbor部署之centos7的基本配置
查看>>