From 9265778f01486bfce0f19a316ea147f1b61b0c5b Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Tue, 7 Mar 2017 16:39:21 +0800 Subject: [PATCH] Create 2024.cpp --- HDOJ/2024.cpp | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 HDOJ/2024.cpp diff --git a/HDOJ/2024.cpp b/HDOJ/2024.cpp new file mode 100644 index 0000000..0a78ebf --- /dev/null +++ b/HDOJ/2024.cpp @@ -0,0 +1,60 @@ +#include +#include +#include +#include +#include + +#include +#include +#include + +/// This Contest and Compile does not support C++11. +//#include +//#include +//#include +//#include + +using namespace std; + +char line[1024]; + +int main() +{ + //cout<<"Hello World!"<='A'&&line[0]<='Z')||(line[0]>='a'&&line[0]<='z')||(line[0]=='_'))) + { + printf("no\n"); + continue; + } + + int len=strlen(line); + bool done=false; + + for(int j=1;j='A'&&line[j]<='Z')|| + (line[j]>='a'&&line[j]<='z')|| + (line[j]=='_')|| + (line[j]>='0'&&line[j]<='9') + )) + { + printf("no\n"); + done=true; + break; + } + } + + if(!done) + { + printf("yes\n"); + } + } + + return 0; +}