Yet Another Nice Girl

All submissions for this problem are available.
Read problems statements in Mandarin Chinese here
Problem Statement
Little Chef doesn't love math anymore. He loves Aleksandra.
Sashen'ka is nice. They spend all the time together. Even their birthdays they are celebrating together, because they were born on the same day :)
And now, this day is coming...
Chef know that most of all Sasha loves numbers, that's why he bought N positive numbers to a girl. From her side, Sasha as all girls, thought that if she likes something, then all people like that too. And bought to a boy N numbers too. xD After all greeting young people decide to play a game with their gifts. The game will be continued for N turns, in each turn the following will be done:
Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
The first line of each test case contains a single integer N denoting the number of numbers in each gift. The second line contains N spaceseparated integers A_{1}, A_{2}, ..., A_{N} denoting the numbers Sasha gave to Chef. Next line describe B_{1}, B_{2}, ..., B_{N} numbers boy gave to girl in the same way.
Output
For each test case, output a single line containing answer for corresponding test. Your answer will be considered as correct if it will have absolute error not more then 10^{6}.
Constraints
Example
Input 3 1 3 4 2 2 3 1 4 2 2 4 2 2 Output: 1.000000 1.500000 0.000000
Explanation
Example case 1. Game will have only 1 turn. Chef will choose 3, while Sasha will choose 4. Since 3^{4}>4^{3} girl will kiss boy. Hence answer is 1.
Author:  ballon_ziq 
Tester:  shangjingbo 
Editorial  http://discuss.codechef.com/problems/ARRGAME2 
Tags  ballon_ziq, easy, oct13, probability, sorting 
Date Added:  2082013 
Time Limit:  2 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 