题目描述
Kabir likes Tara's smile and wants to look at her smile. They are sitting in the class and you are friends with Kabir. You have to place a mirror (point size) in the front wall of the class so that Kabir can have a glimpse of Tara's smile.
Consider the front wall as x-axis . You are given the coordinates of position of Kabir (x1,y1)$(x1,y1)$ and Tara (x2,y2)$(x2,y2)$. Find the position where the mirror should be placed.
-----Input:-----
- First line will contain T$T$, number of testcases. Then the testcases follow.
- First line of each testcase contains two integers x1,y1$x1, y1$.
- Second line of each testcase contains two integers x2,y2$x2, y2$.
-----Output:-----
For each testcase, print the x-coordinate of the mirror. Absolute error of 10−2$10^{−2}$ is allowed.
-----Constraints:-----
- 1≤T≤1000$1 \leq T \leq 1000$
- 1≤x1,y1,x2,y2≤105$1 \leq x1,y1,x2,y2 \leq 10^5$
-----Sample Input:-----
1
1 1
4 4
-----Sample Output:-----
1.60
输入格式
见题面
输出格式
见题面