104 - The 11th Zhejiang University Programming Contest - H
In geometry, a parallelogram is a quadrilateral with two pairs of parallel sides. Given n, you are asked to count the number of different parallelograms that sactisfy the following conditions:
Note that congruent parallelograms like the two in the figure below are counted as only one.
There are multiple test cases. The first line of input is an integer T indicating the number of test cases. (0 < T ≤ 100000)
Each test case consists of a line containing four possitive real number a, b, c and d(0 < a ≤ b ≤ 50, 0 < c ≤ d ≤ 50). There are at most 2 digits after the floating point for each real number.
For each test case, output the number of different paralleograms in one line.
3 1 1 1 1 1 1.5 1 1 1 2 1 2
1 2 6
Author: Local Contests 2011 Committee
Contest: The 11th Zhejiang University Programming Contest