?????????????£?
???????????????????飬?????е????????????????????????“?????”????г???????1??2?г????1??2??12??21.?????4??“?????”
??????????????
????????????????????????????????????????????
?????????????
???????????????ж????“?????”
?????????????
????3
????1 2 3
????????????
????15
?????????·??????????????????????????
?????????????????ο?
????import java.util.ArrayList;
????import java.util.LinkedList;
????import java.util.List;
????import java.util.Scanner;
????public class Main{
????static int index=0;
????public static void main(String[] args) {
????Scanner mScanner=new Scanner(System.in);
????int num=mScanner.nextInt();
????List<String> array=new ArrayList<String>();
????for (int i = 0; i < num; i++) {
????array.add(mScanner.next());
????}
????listAll(array?? "");
????System.out.println(index-1);
????}
????public static void listAll(List list?? String prefix) {
????index++;
????//if (list.isEmpty()) {
????// System.out.print(prefix+" ");
????//}
????int len = list.size();
????for (int i = 0; i < len; i++) {
????List temp = new LinkedList(list);
????listAll(temp?? prefix + temp.remove(i));
????}
????}
????}
??????????Java????????????“?????”???????????????????????java??????????????.