-->
当前位置:首页 > 题库

PROGRAMMING:Keven's going home

Luz5年前 (2021-05-10)题库407
Keven happily ended his sophomore's life and decided to start the summer training. Before the summer training, he wanted to go home first. Keven is now at school, and the high-speed railway will stop checking tickets in $$x $$minutes, but he found an embarrassing thing - they don't know the way to the high-speed railway station.
The roads in this city are very strange. There are $$n + M $$roads in front of him. Among them, $$n $$roads are right. If you take the right road, you will be in $$a_ I $$minutes later to the high-speed railway station, the other $$M $$road is not correct, if you take the wrong road, it will be in $$B_ I $$back to the starting point in minutes.
Keven can only choose one road at random, but because of his poor memory, even if he takes an incorrect road, he may choose it again.
Keven is a very cautious person. He wants to know the expectation of the time needed to get to the high-speed railway station from the school. If $$ex < = x $$, he will start, otherwise he will sign a new contract.
###Input format:
The first line is an integer $$t $, which indicates that there are $$t $$group data. Next, there are $$t $$group data, and each group of data contains three lines:
$$n,m,X$$
$$a_ 1,a_ 2,a_ 3,...a_ n$$
$$b_ 1,b_ 2,b_ 3,...b_ m$$
Guarantee $$1 < = T < = 100,1 < = n, m < = 10,1 < = a_ i,b_ i<=1000$$
###Output format:
For each group of data, if you want to start, then output "go", otherwise output "Gaiqian", without quotation marks.
###Input example:
```in
two
4 7 2
1 1 1 1
1 1 1 1 1 1 1
7 4 2
1 1 1 1 1 1 1
1 1 1 1
```
###Output example:
The corresponding output is given here. For example:
```out
GaiQian
Go
```







answer:If there is no answer, please comment