HRY and array
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Given two arrays A,B with length n, perform the following operations in order:
1. Randomly shuffle array A
2. Randomly shuffle array B
3. Calculate
It is easy to know that there possible combinations in total. Please calculate the expectation of S.

输入描述:

The first line contains an integer T, indicating the number of test case.
For each test case there are three lines :
The first line is a positive integer n, indicating the length of array A, B.
The second line contains n non-negative integers, indicating array A.
The third line contains n non-negative integers, indicating array B.
.
It is guaranteed that the sum of n does not exceed .

输出描述:

For each test case output a line of a real number, indicating the expectation of S, rounded to 30 decimal places.
示例1

输入

复制
2
3
1 1 1
1 1 1
2
1 2
3 4

输出

复制
3.000000000000000000000000000000
10.500000000000000000000000000000