#include <bits/stdc++.h>
using namespace std;
bool isch(char c){
return (c=='~')||(c=='!')||(c=='@')||(c=='#')||(c=='$')||(c=='%')||(c=='^');
}
int main(){
int n;cin>>n;
while(n--){
int low=0,up=0,dig=0,ch=0;
string s;cin>>s;
int len=s.length();
if(len<8||len>16)
cout<<"NO"<<endl;
else{
for(int i=0;i<len;i++){
if(islower(s[i])) low=1;
if(isupper(s[i])) up=1;
if(isdigit(s[i])) dig=1;
if(isch(s[i])) ch=1;
}
if(low+up+dig+ch>=3) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
}
return 0;
}
HDU 2043 密码
最新推荐文章于 2021-07-21 13:46:35 发布