The process is made of violence enumeration
# include & lt; Bits/stdc++. H>
using namespace std;
Vectora;
int n;
Int b [10].
Int ret.
Void DFS (int I) {
If (I==a.s considering ()) {
Ret++;
} else {
For (int j=0; J & lt; A [I]. The size (); J++) {
If (b [a [I] [j] - '0']) {
B [a [I] [j] - '0')=0.
DFS (I + 1);
B [a [I] [j] - '0']=1;
}
}
}
}
Int main () {
Cin & gt;> n;
for(int i=0; iString x; Cin & gt;> x;
Amy polumbo ush_back (x);
}
for(int i=0; i <10; [I] i++) b=1;
Ret=0;
DFS (0);
coutreturn 0;
}
The building Lord stupid, drew a sketch for half a day is not very understand the thinking of it, or have other ideas welcome pointed out