|
|
|
@ -1,8 +1,47 @@
|
|
|
|
|
#include <bits/stdc++.h>
|
|
|
|
|
using namespace std;
|
|
|
|
|
int sz;
|
|
|
|
|
int dx;
|
|
|
|
|
int xx;
|
|
|
|
|
int ts;
|
|
|
|
|
int jcq;
|
|
|
|
|
string len;
|
|
|
|
|
string str;
|
|
|
|
|
int main() {
|
|
|
|
|
int a = 7;
|
|
|
|
|
int b = (a & (-3));
|
|
|
|
|
cout << b << endl;
|
|
|
|
|
cin >> str;
|
|
|
|
|
for (int i = 0; i < str.size(); i++) {
|
|
|
|
|
if (str[i] == ',' || i == str.size() - 1) {
|
|
|
|
|
// check
|
|
|
|
|
/*
|
|
|
|
|
1,排除非法字符(看jcq)如果是,跳过。
|
|
|
|
|
2,长短限制:6~12
|
|
|
|
|
3,数字+大写+小写>=2,特殊》=1.
|
|
|
|
|
*/
|
|
|
|
|
if (jcq > 0) continue;
|
|
|
|
|
if (len.size() < 6 || len.size() > 12) continue;
|
|
|
|
|
if (sz + dx + xx < 2) continue;
|
|
|
|
|
if (ts < 1) continue;
|
|
|
|
|
cout << len << endl;
|
|
|
|
|
// clear
|
|
|
|
|
sz = 0;
|
|
|
|
|
dx = 0;
|
|
|
|
|
xx = 0;
|
|
|
|
|
ts = 0;
|
|
|
|
|
len = "";
|
|
|
|
|
jcq = 0;
|
|
|
|
|
} else {
|
|
|
|
|
len += str[i];
|
|
|
|
|
if (str[i] <= '9' && str[i] >= '0') {
|
|
|
|
|
sz = true;
|
|
|
|
|
} else if (str[i] <= 'Z' && str[i] >= 'A') {
|
|
|
|
|
dx = true;
|
|
|
|
|
} else if (str[i] <= 'z' && str[i] >= 'a') {
|
|
|
|
|
xx = true;
|
|
|
|
|
} else if (str[i] == '!' || str[i] == '@' || str[i] == '#' || str[i] == '$') {
|
|
|
|
|
ts = true;
|
|
|
|
|
} else
|
|
|
|
|
jcq++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|