#include<iostream>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#include<limits>
using namespace std; int main()
{
//freopen("in.txt","r",stdin);
int n;
char a[];
cin>>n;
getchar();
while(n--)
{
gets(a);
int flag=;
for(int i=;i<strlen(a);i++)
{
if(a[i]=='_' || (a[i]>='' && a[i]<='') || (a[i]>='A' && a[i]<='Z') || (a[i]>='a' && a[i]<='z') )
{
if(i== && (a[i]>='' && a[i]<=''))
{
flag=;
break;
}
continue;
}
else
{
flag=;
break;
}
}
if(flag)
cout<<"no"<<endl;
else
cout<<"yes"<<endl;
}
return ;
}

hdu2024C语言合法标识符的更多相关文章

  1. HDOJ2024C语言合法标识符

    C语言合法标识符 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Su ...

  2. 1164: 零起点学算法71——C语言合法标识符(存在问题)

    1164: 零起点学算法71——C语言合法标识符 Time Limit: 1 Sec  Memory Limit: 64 MB   64bit IO Format: %lldSubmitted: 10 ...

  3. C语言合法标识符 题解

    输入一个字符串,判断其是否是C的合法标识符.  Input输入数据包含多个测试实例,数据的第一行是一个整数n,表示测试实例的个数,然后是n行输入数据,每行是一个长度不超过50的字符串. Output对 ...

  4. 杭电2024 C语言合法标识符

    链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=2024 开始真的对这题是一点头绪都没有,简直了.然后事实证明是我想多了,这题主要是把概念给弄清楚 ...

  5. HDU_2024——判断字符串是否是c语言合法标识符

    Problem Description 输入一个字符串,判断其是否是C的合法标识符.   Input 输入数据包含多个测试实例,数据的第一行是一个整数n,表示测试实例的个数,然后是n行输入数据,每行是 ...

  6. HDU 2024 C语言合法标识符

    http://acm.hdu.edu.cn/showproblem.php?pid=2024 Problem Description 输入一个字符串,判断其是否是C的合法标识符.   Input 输入 ...

  7. Problem J: 零起点学算法105——C语言合法标识符

    #include<stdio.h> #include<ctype.h>//调用isalpha函数 int main() { int n; ]; while(scanf(&quo ...

  8. c语言合法标识符

    #include <iostream>#include <stdio.h>using namespace std;char str[100][51];int main() { ...

  9. C语言合法标识符(hud2024)

    输入方式:先输入一个整型,再循环输入带空格的字符串. 思考:整型用scanf_s()输入.大循环输入字符串前用getchar()函数读取缓冲区的字符.然后,输入带空格的字符串就要用”gets_s()“ ...

随机推荐

  1. DataView usage combind with event and ViewModel From ERP-DEV

    reflesh the selected item in DataView when we use DataView to display a set of data. Generally, we b ...

  2. java数据结构和算法------插入排序

    package iYou.neugle.sort; public class Insert_sort { public static void InsertSort(double[] array) { ...

  3. Json.Net使用JSON Schema验证JSON格式

    Json.NET supports the JSON Schema standard via the JsonSchema and JsonValidatingReader classes. It s ...

  4. forword属性

    forword属性 2013年7月8日 15:07 Name: Forward的名字,与mapping.findForward方法传入的值相同. Path: 请求转发的页面路径 Redirect: 请 ...

  5. Android -- TabHost、Fragment、状态保存、通信

    工程结构                                                                                       TabAFm到Ta ...

  6. LintCode-Implement Queue by Stacks

    As the title described, you should only use two stacks to implement a queue's actions. The queue sho ...

  7. Android Studio 单刷《第一行代码》系列 02 —— 日志工具 LogCat

    前情提要(Previously) 本系列将使用 Android Studio 将<第一行代码>(书中讲解案例使用Eclipse)刷一遍,旨在为想入坑 Android 开发,并选择 Andr ...

  8. openwrt的交叉编译

    默认情况下,openwrt编译脚本会自动从Internet上获取所需要的软件包源代码,并把下载的源码包存放在当前目录的 dl/ 目录中:  在 build_dir/ 目录中存放编译中使用的软件包,   ...

  9. 【BZOJ】【1150】【CTSC2007】数据备份Backup

    堆/贪心 一共N-1个元素……用堆维护最大值,取了第x个元素以后,插入v[x-1]+v[x+1]-v[x]这个元素,如果再取这个新元素就表示不取x,而取x-1和x+1……大概就是这种“带反悔”的思路吧 ...

  10. maven ArtifactTransferException: Failure to transfer

    我在使用Myeclipse碰见这个错误,我没有用伺服,直接连接到maven中心. ArtifactTransferException: Failure to transfer org.apache.h ...