mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
ddd34a4f1c
2000-2099
28 lines
533 B
C++
28 lines
533 B
C++
#include <ctype.h>
|
|
#include <stdio.h>
|
|
int main(void)
|
|
{
|
|
int n, d, i;
|
|
char sym[64];
|
|
scanf("%d%*c", &n);
|
|
while (n--)
|
|
{
|
|
gets(sym);
|
|
if (sym[0] != '_' && !isalpha(sym[0]))
|
|
{
|
|
puts("no");
|
|
continue;
|
|
}
|
|
for (d = i = 1 ; sym[i] ; i++)
|
|
{
|
|
if (!isalnum(sym[i]) && sym[i] != '_')
|
|
{
|
|
d = 0;
|
|
break;
|
|
}
|
|
}
|
|
puts(d ? "yes" : "no");
|
|
}
|
|
return 0;
|
|
}
|