#include <iostream>
#include <stdio.h>
using namespace std;
char str[100][51];
int main()
{
int i,j,n,f,t;

cin>>n;getchar();
for(i=1;i<=n;i++)
{
gets(str[i]);
for(j=0;str[i][j]!='\0';j++)
t=j;
f=0;
if((str[i][0]>='A'&&str[i][0]<='Z')||(str[i][0]>='a'&&str[i][0]<='z')||str[i][0]=='_')
{
f=1;
for(j=1;j<=t;j++)
{
if((str[i][j]>='0'&&str[i][j]<='9')||(str[i][j]>='A'&&str[i][j]<='Z')||(str[i][j]>='a'&&str[i][j]<='z')||str[i][j]=='_') {f=1;}
else {f=0;break;}
}
}
else f=0;
if(f==1) cout<<"yes"<<endl;
else cout<<"no"<<endl;
}
return 0;
}

最新文章

  1. python subprocess阻塞
  2. Thinkphp源码分析系列–开篇
  3. JAX-RS入门
  4. stm32 堆和栈(stm32 Heap &amp; Stack)【worldsing笔记】
  5. Socket实现简单的聊天通信
  6. Egret 事件机制
  7. C学习-fgets()篇1
  8. [原创]linux简单之美(一)
  9. AVL树----java
  10. NPOI封装
  11. .net core 2.0学习笔记(五):程序配置&amp;ConfigurationManager
  12. C# RichTextBox设置行间距
  13. Java中clone方法的使用
  14. -bash:syntax error near unexpected token &#39;(&#39;
  15. Node.js建立服务、路径处理与响应
  16. NodeJS 模块&amp;函数
  17. Clone of COCO API
  18. jpetStore 学习总结(1)
  19. 多线程简单案例 - join( ) -lock()
  20. Memory leak by misusing Autofac

热门文章

  1. 《JavaScript 闯关记》之变量和数据类型
  2. Java生成登陆时使用的图片验证码
  3. UITabBarController+微博简单模拟1
  4. MVC中的错误过滤器无法拦截URL路径错误的解决办法
  5. 如何在Google Map中处理大量标记(ASP.NET)(转)
  6. R - 一只小蜜蜂...(第二季水)
  7. .Net Service开发(一)
  8. pat_1
  9. Red and Black(水)
  10. Python中各种集合 list tuple set dict