You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
435 B
C++
22 lines
435 B
C++
#include <iostream>
|
|
#include <string>
|
|
#include <algorithm>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int n;
|
|
cin>>n;
|
|
string s;
|
|
getline(cin,s);
|
|
while(n--)
|
|
{
|
|
bool flag=true;
|
|
getline(cin,s);
|
|
for(size_t i=0; i<s.size()&&flag; i++)
|
|
if(isdigit(s[0])||!(isalnum(s[i])||s[i]=='_'))
|
|
flag=false;
|
|
cout<<(flag?"yes":"no")<<endl;
|
|
}
|
|
return 0;
|
|
}
|