题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2024
//C++代码
#include<iostream>
#include<cstring>
#include<string>
#include<cctype>
using namespace std;
int main(){
int n,i;
char a[55];
(cin>>n).getline(a,55);
while(n--){
cin.getline(a,55);
int len=strlen(a);
for(i=0;i<len;i++){
if(a[i]!='_' && !isalnum(a[i])){
cout<<"no"<<endl;
goto out;
}
}
if(isdigit(a[0])){
cout<<"no"<<endl;
goto out;
}
cout<<"yes"<<endl;
out:;
}
return 0;
}