#P3598. A secret of 《The Tai Chi Master》

    ID: 2482 远端评测题 1000ms 32MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>2010 ACM-ICPC Multi-University Training Contest(16)——Host by NUDT

A secret of 《The Tai Chi Master》

Problem Description

Do you remember a TV play called “The Tai Chi Master” in 1990s. In this play, the leading role Yang Yuqian (actor is Wu Jing) is fond of Tai Ji and becomes a great master at last. However, the Chen Style Taiji was only open to family Chen. So Yang Yuqian decides to steal the skill with the help from a teenager called Chen Shaoqi. They are best friends, and Shaoqi is the “son” of Chen family leader. But one day, Chen Zhenying, Shaoqi’s father, found Yang Yuqian and decided to drive him away. Chen Zhenying is interested in math. So he gives Yang Yuqian a chance: if Yang can solve his problem, then Yang can be his new apprentice.


The problem is that : C is a circle of Taiji in figure-1. In figure-2, the C is a circle and its centre is (0, 0). Its radius is R.is a line integral in plural plane according to the circle C and its direction is anti-clockwise. We define The Yang Yuqian’s dream will come true only if  I  is calculated.

Input

Multiply cases. First line is number of test cases.
Each test case consisted of 7 integers. a,b,c,d,x,y,R represent the a,b,c,d,R in description and x,y represent the real part and imaginary part of Z0. a,b,c,x,y∈(-10000,10000);d∈(-10000,0)∪(0,10000);R∈(0,10000)

Output

Each test case is printed one line. If the answer is plural, the output format is a±bi . If the answer is real number, output it as writing habits. All real numbers are round to 4 decimals.

2 0 0 0 1 0 0 1 1 2 1 1 1 0 1
0.0000 -18.8496i

Author

alpc54