#include #include #include #include #include #include #include #include #include #include #include #include #include #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl; #define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } using namespace std; typedef long long ll; template vector> vec2d(int n, int m, T v){ return vector>(n, vector(m, v)); } template vector>> vec3d(int n, int m, int k, T v){ return vector>>(n, vector>(m, vector(k, v))); } template void print_vector(vector v, char delimiter=' '){ if(v.empty()) { cout << endl; return; } for(int i = 0; i+1 < v.size(); i++) cout << v[i] << delimiter; cout << v.back() << endl; } bool ok(string s){ int cnt_digit = 0, cnt_al = 0, cnt_else = 0; for(char c: s){ if(isdigit(c)){ cnt_digit++; }else if('a' <= c && c <= 'z'){ cnt_al++; }else{ cnt_else++; } } return cnt_digit > 0 && cnt_al > 0 && cnt_else > 0; } char conver(char c){ if(c == 'l') return '1'; if(c == 'o') return '0'; if(c == 'a') return '@'; if(c == 's') return '$'; return c; } string convert(string s, int mask){ string t; int n = s.size(); for(int i = 0; i < n; i++){ if(mask&(1<> s; int ans = 0; set st; for(int mask = 0; mask < (1<<8); mask++){ if(ok(convert(s, mask))) st.insert(convert(s, mask)); } cout << st.size() << endl; }