import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) throws Exception { new Main().run(); } void run() { Scanner sc=new Scanner(System.in); int N=sc.nextInt(); int[] o1=new int[N]; int[] o2=new int[N]; for(int i=0;ib[o2[j]])++p; else if(a[o1[j]]0)++num; ++den; }while(nextPermutation(o1)); }while(nextPermutation(o2)); System.out.println(num/den); } boolean nextPermutation(int[] o) { int s=o.length-1; while(s>0&&o[s-1]>o[s]) --s; if(s==0)return false; int p=s; while(p+1