QOJ.ac

QOJ

حد الوقت: 0.5 s حد الذاكرة: 512 MB مجموع النقاط: 100

#1258. 足球

الإحصائيات

你站在平面上的 $(0, 0)$ 位置,想要将球传给站在 $(x_t, y_t)$ 的队友。不幸的是,对方球队的一名球员站在 $(x_o, y_o)$ 位置,想要拦截这次传球。

当球员在某一时刻的位置与球的位置重合时,该球员即获得球。两名球员的移动速度均为 $s_p$,你可以使球以恒定的速度 $s_b$ 飞行。注意,球在某一时刻会落地并因摩擦力停止,因此不存在球员无法接球的情况,但为了简化问题,我们假设这种情况发生在非常遥远的地方。

你的任务是确定是否能完成传球,即掷出球,使得队友比对手更快地接到球。如果能完成传球使得队友先接到球,输出 “+”(不含引号);如果不能先接到球,但能完成传球使得两名球员同时接到球,输出 “0”;否则输出 “-”。

输入格式

第一行包含一个整数 $n$ ($n \le 10^5$):测试用例的数量。接下来的 $n$ 行,每行描述一个独立的测试用例,包含六个整数 $x_t, y_t, x_o, y_o, s_b, s_p$ ($-75 \le x_t, y_t, x_o, y_o \le 75$; $1 \le s_b, s_p \le 75$):分别为队友的坐标、对手的坐标、球的速度以及球员的速度。你所在的位置、队友的位置和对手的位置两两不同。

输出格式

在一行中输出 $n$ 个答案,中间不要有空格。

样例

输入 1

3
1 0 2 0 1 1
0 3 0 -1 1 2
75 0 2 0 1 10

输出 1

+0-

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.