杭电ACM2024求解答!!!

2024-12-25 07:01:28
推荐回答(1个)
回答1:

#include
#include
using namespace std;
int main()
{
int n,i,j;
char strs[50],str[256][5];
while(cin>>n)
{
getchar();
for(i=0;i {
gets(strs);
if(strs[0]=='_'||strs[0]>='A'&&strs[0]<='Z'||strs[0]>='a'&&strs[0]<='z')
{
j=0;
while((strs[j]=='_'||strs[j]>='a'&&strs[j]<='z'||strs[j]>='A'&&strs[j]<='Z'||strs[j]>='0'&&strs[j]<='9')&&strs[j]!='\0') j++;
if(strs[j]=='\0') strcpy(str[i],"yes");
else strcpy(str[i],"no");
}
else strcpy(str[i],"no");
}
for(i=0;i cout< }
return 0;
}