胸口左下侧大概是肋骨的位置有点小痛,如果明天还痛的话就去医院看看。

最近把 记忆大师项目搞定了,也顺便帮卢老爷的抢答器的代码写完了,除了他的蜂鸣器不工作以外(猜测是电压不够),其他都完成要求了。

前几天接了川师大一个学长的QQ机器人的活,用来转发消息和审核内容什么的,我觉得我们学校的失物招领群也可以这么搞。

阅读全文 »

嘛,做科协的新生赛题目碰到了,这里记录一下思路。题目如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Pinball

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 574 Accepted Submission(s): 249



Problem Description

There is a slope on the 2D plane. The lowest point of the slope is at the origin. There is a small ball falling down above the slope. Your task is to find how many times the ball has been bounced on the slope.

It's guarantee that the ball will not reach the slope or ground or Y-axis with a distance of less than 1 from the origin. And the ball is elastic collision without energy loss. Gravity acceleration g=9.8m/s2.








Input

There are multiple test cases. The first line of input contains an integer T (1 ≤ T ≤ 100), indicating the number of test cases.

The first line of each test case contains four integers a, b, x, y (1 ≤ a, b, -x, y ≤ 100), indicate that the slope will pass through the point(-a, b), the initial position of the ball is (x, y).






Output

Output the answer.

It's guarantee that the answer will not exceed 50.






Sample Input

1

5 1 -5 3




Sample Output

2
阅读全文 »