
ZOJ Problem Set  3484
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. Input 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. Output For each test case, output the number of different paralleograms in one line. Sample Input 3 1 1 1 1 1 1.5 1 1 1 2 1 2 Sample Output 1 2 6 Author: GUAN, Yao Contest: The 11th Zhejiang University Programming Contest 