public class Main6{
static char ab[] =
new char[
15];
static int count =
0;
static void show(){
ab[
14]=
'花';
for (
int i =
0; i < ab.length; i++) {
System.
out.print(ab[i]);
}
System.
out.println();
}
static int a(
int i,
int s,
int f,
int d) {
if (s >
0) {
ab[i]=
'店';
a(i+
1,s -
1, f, d *
2);
}
if (f >
1) {
ab[i]=
'花';
a(i+
1,s, f -
1, d -
1);
}
if (s ==
0 && f ==
1 && d ==
1) {
count++;
show();
}
return count;
}
public static void main(String[] args) {
System.
out.println(a(
0,
5,
10,
2));
}
}