From 1b50ec48402f1d3ecb7738a450b449753eadf0bb Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Mon, 23 May 2016 22:07:52 +0800 Subject: [PATCH] Create 1430.cpp --- QUSTOJ/1430.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 QUSTOJ/1430.cpp diff --git a/QUSTOJ/1430.cpp b/QUSTOJ/1430.cpp new file mode 100644 index 0000000..6a38ec8 --- /dev/null +++ b/QUSTOJ/1430.cpp @@ -0,0 +1,48 @@ +#include +#include +#include +int main() +{ + int a,b,c,d; + char tmp[256]; + int times; + scanf("%d",×); + for(;times>0;times--) + { + scanf("%s",tmp); + a=0; + b=0; + c=0; + d=0; + int len=strlen(tmp); + int i; + for(i=0;i='A'&&tmp[i]<='Z') + { + a=1; + } + else if(tmp[i]>='a'&&tmp[i]<='z') + { + b=1; + } + else if(tmp[i]>='0'&&tmp[i]<='9') + { + c=1; + } + else if(tmp[i]=='~'||tmp[i]=='!'||tmp[i]=='@'||tmp[i]=='#'||tmp[i]=='$'||tmp[i]=='%'||tmp[i]=='^') + { + d=1; + } + } + if(a+b+c+d>=3) + { + printf("YES\n"); + } + else + { + printf("NO\n"); + } + } + return 0; +}