#include using namespace std; using ll=long long; int main(){ //input int n; cin>>n; vectora(n); vectorb(n); for(int i=0;i>a[i]; for(int i=0;i>b[i]; sort(a.begin(),a.end());//next_permutationで全順列を出すときは昇順である必要があるらしい //nが4までなのでaの全順列を列挙し比較 double ans; int wingame=0; int cntgame=0; do{ int wincard=0; for(int i=0;ib[i])wincard++; else wincard--; } if(wincard>0) wingame++; cntgame++; }while(next_permutation(a.begin(),a.end())); //output double Wing=wingame; double Cntg=cntgame; ans=Wing/Cntg; cout<