当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5198:Strange Class

题目描述
In Vivid’s school, there is a strange class(SC). In SC, the students’ names are very strange. They are in the same format: $a^{n}b^{n}c^{n}$(a,b,c must not be the same with each other). For example studens whose names are“abc”,”ddppqq” are in SC, however studens whose names are “aaa”,“ab”,”ddppqqq” are not in SC.
Vivid makes friends with so many students, he wants to know who are in SC.
输入解释
There are multiple test cases (about 10), each case will give a string S which is the name of Vivid’s friend in a single line.
Please process to the end of file.

[Technical Specification]

$1 \leq |S| \leq 10$.

|S| indicates the length of S.

S only contains lowercase letter.
输出解释
For each case, output YES if Vivid’s friend is the student of SC, otherwise output NO.
输入样例
abc
bc
输出样例
YES
NO
来自杭电HDUOJ的附加信息
Recommend hujie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5198

最后修改于 2020-10-25T23:20:38+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/65536K(Java/Others)