#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include<ctype.h>
using namespace std;
char str[100];
int cnt[4];
int main() {
while (gets(str)){
int len = strlen(str);
string s; memset(cnt, 0, sizeof(cnt));
for (int i = 0; i < len; i++)
{
int t_len = s.length(); bool flag = 0;
if (isupper(str[i]))
cnt[0]++;
else if (islower(str[i]))
cnt[1]++;
else if (isdigit(str[i]))
cnt[2]++;
else
cnt[3]++;
for (int j = 0; j < t_len; j++)
{
if (str[i] == s[j]){ flag = 1; break; }
}
if (!flag)s += str[i];
}
int s_len = s.length();
if (len < 8 || s_len <= 4){ cout << "you are thrown out of server!\n"; continue; }
int all = 0;
for (int i = 0; i < 4;i++)
if (cnt[i])
all++;
if (all == 1){ cout << "std::weak is laughing!\n"; continue; }
if ((all == 2 || all == 3) || (all==4&&len < 13)){ cout << "33luo can crack this!\n"; continue; }
cout << "NSA is unhappy!\n";
}
return 0;
}
NOJ2101 7_密码强度(水模拟题)
最新推荐文章于 2024-10-14 15:27:31 发布