main
黄海 1 year ago
parent 517eed9098
commit 6423ca5bd3

@ -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)
26~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;
}
Loading…
Cancel
Save