标签:
背景:水。主要是#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; }
标签:
原文地址:http://blog.csdn.net/jibancanyang/article/details/44161553