#include<stdio.h> #include<string.h> #include<malloc.h> int main(){ char arr[] = { '~','!','@','#','$','%','^' }; int n; int state = scanf("%d", &n); char c; int flag = 0;//统计flag是否满足3种 int flag_1 = 0;//统计flag是否满足3种 int flag_A = 0;//统计flag是否满足3种 int flag_a = 0;//统计flag是否满足3种 int flag_tebie = 0;//统计flag是否满足3种 int count = 0;//密码长度. state = scanf("%c", &c); for(int i = 0; i < n; i++){ if(c == '\n') state=getchar(); while((state = scanf("%c", &c)) != EOF){ count++; if(c == '\n'){ flag = flag_1 + flag_A + flag_a + flag_tebie; if(count >= 8 && flag >= 3) printf("YES\n"); else printf("NO\n"); flag_1 = 0; flag_A = 0; flag_a = 0; flag_tebie = 0; count = 0; } if(c >= '0' && c <= '9'){ flag_1 = 1; } else if(c >= 'A' && c <= 'Z'){ flag_A = 1; } else if(c >= 'a' && c <= 'z'){ flag_a = 1; } else{ for(int j = 0; j < 7; j++){ if(c == arr[j]){ flag_tebie = 1; break; } } } } } return 0; }
0.0分
0 人评分