Q10014: Simple calculations

有一種數列含有 n+2 個數,a0, a1, ...... , an, an+1(n < 3000; -1000 <= ai <= 1000)。其中對每一個 i=1, 2, ... , n有這樣的性質:ai = ( ai-1 + ai+1) / 2 - ci

給你 a0, an+1, c1, c2, ......, cn,請你寫一個程式算出 a1 是多少。

Input

輸入的第一列有一個整數,代表以下有多少組測試資料。

每組測試資料的第一列有1個整數 n。接下來的兩列為 a0 和 an+1(到小數點後2位)。再接下來的 n 列為 c1 到 cn(也是到小數點後2位)。

第一列與第一組測試資料以及各組測試資料間有一空白列,請參考Sample Input。

Output

對每組測試資料輸出一列 a1 。輸出到小數點後2位,測試資料間請空一列,請參考Sample Output。

Sample Input Sample Output
2

1
50.50
25.50
10.15

1
50.50
25.50
10.15
27.85

27.85