You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# include <bits/stdc++.h>
using namespace std ;
int sz ;
int dx ;
int xx ;
int ts ;
int jcq ;
string len ;
string str ;
int main ( ) {
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 ;
}