1315: Variable-like String Literal Check

内存限制:128 MB 时间限制:1.000 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:84 通过:15 通过率:17.857%

题目描述

We all know that the variable names in C language are restricted, they have to obey the following rules:
1. With the leading of one of Latin letters(aka. 'a' to 'z', 'A' to 'Z') or underscore(aka. '_')
2. Only contain Latin letters, Arabic numeric digits(aka. '0' to '9') or underscore.
I will give you several string literals, you should tell me if they can be used for the naming of variables.
If it can be treated as a variable name, you need to print the string literal "Yes", otherwise output "No" (no need to print the pair of quotation marks).
Do not consider C keywords.

输入格式

N and next N lines of string literals (without whitespace characters).

输出格式

"Yes" or "No"

输入样例 复制

5
arr
3DVector
i_dont_like_too_long_variable_name
__DEBUG__
ONLINE_JUDGE

输出样例 复制

Yes
No
Yes
Yes
Yes

数据范围与提示

Values' range:
0 < N <= 10, 0 < length of any string <= 20.

分类标签