首页 > 其他 > 详细

hdu 2024

时间:2015-03-09 22:27:33      阅读:451      评论:0      收藏:0      [点我收藏+]
背景:水。主要是#include<cctype>还忘了
#include<cstdio>
#include<iostream>
#include<cctype>
using namespace std;

int main(void){
    int t;
    scanf("%d",&t);
    while(t--){
        bool ok=true;
        for(int i=0;;i++){
            char c=getchar();
            if(i == 0){
                if(c != '_' && !isalpha(c)) ok=false;
            }else{
                if(isdigit(c) || isalpha(c) || c == '_');
                else if(c == '\n') break;
                else{
                    ok=false;
                }
            }
        }
        if(ok) printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


hdu 2024

原文:http://blog.csdn.net/jibancanyang/article/details/44161553

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!