Codeforces Round #397 B
来源:互联网 发布:慈溪行知职业技术学校 编辑:程序博客网 时间:2024/05/29 04:13
题意是从串的开始换字符,从a开始
在一个字符之前不能出现比他大的字符
#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int maxn = 100 + 7, INF = 0x7f7f7f7f;string s;int main() { cin >> s; char c = 'a'; for(int i = 0; i < s.size(); ++i) { if(s[i] == c) { c++; } else if(s[i] > c) { puts("NO"); return 0; } } puts("YES"); return 0;}
阅读全文
1 0
- Codeforces Round #397 B
- Codeforces Round #136 B
- Codeforces Round #239 --B
- Codeforces Round #300 B
- codeforces round # 412B
- Codeforces Round #425 B
- Codeforces Round #438 B
- Codeforces Round #439 B
- Codeforces Round #439 B
- Codeforces Beta Round #60-B
- Codeforces Beta Round #2 B
- codeforces round 176Div1 B
- codeforces div2 round#231 B
- codeforces div2 round#230 B
- Codeforces Round #1B Spreadsheets
- Codeforces Round #274 B. Towers
- B. Towers(Codeforces Round #274)
- Codeforces Beta Round #3 B
- DUT数模组第一周周记
- 自动化运维工具SaltStack详细部署及用SaltStack实现自动部署lamp架构
- 棋盘覆盖
- 一个ajax上传文件的简单案例
- java反转字符串
- Codeforces Round #397 B
- stm32F205程序移植到stm32F405片子,使用FPU时注意事项
- Mac OS X 安装 Consolas 字体
- Python2 之汉字编码为unicode问题(即类似\xc3\xa4)
- 分页
- C#--Winform项目核心模块--考勤模块(三)
- 忍
- KMP算法实现
- robot framework 的AutoItLibrary常用关键字