QOJ.ac

QOJ

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

#7511. 平面图

الإحصائيات

平面上有 $n$ 个基点,以及连接它们的一些线段。 保证任意两个基点不重合,任意三个基点不共线,且线段仅在端点处相交。 平面上还有 $m$ 个源点。 保证每个源点与 $n$ 个基点均不相同,且不在任何线段上。 问题是,对于每一条线段,判断是否能从某个源点出发,画一条曲线到达该线段的中点,且不与任何其他线段相交。

输入格式

第一行包含三个整数 $n, m, e$ ($1 \le n, m \le 100; 0 \le e \le 300$),分别表示基点、源点和线段的数量。 接下来的 $n$ 行,每行包含两个整数 $x, y$ ($|x|, |y| \le 10^9$),表示一个基点 $(x, y)$。 接下来的 $m$ 行,每行包含两个整数 $x, y$ ($|x|, |y| \le 10^9$),表示一个源点 $(x, y)$。 接下来的 $e$ 行,每行包含两个整数 $i, j$,表示连接第 $i$ 个基点和第 $j$ 个基点的线段 ($1 \le i < j \le n$)。

输出格式

输出一个长度为 $e$ 的字符串。如果可以从某个源点画一条曲线到达第 $i$ 条线段的中点且不与任何其他线段相交,则字符串的第 $i$ 个字符必须为 “1”,否则为 “0”。

样例

样例输入 1

4 1 3
-2 0
0 2
2 0
0 1
0 3
1 2
2 3
1 3

样例输出 1

111

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.