LEBLOCKS test case explain?

Can somebody be kind enough to explain test case of LEBLOCKS
CodeChef: Practical coding for everyone \

Input:
1
7 5
3 1
2 2
2 1
4 3
1 2
1 3
4 4

Output:
0.9095238

try to write a brute force code…yu will get the ans.