问题1315--Variable-like String Literal Check

1315: Variable-like String Literal Check

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 128 MB

提交

题目描述

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"

样例输入 Copy

5
arr
3DVector
i_dont_like_too_long_variable_name
__DEBUG__
ONLINE_JUDGE

样例输出 Copy

Yes
No
Yes
Yes
Yes

提示

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

来源/分类