QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 1024 MB Total points: 100

#3769. 共线点

الإحصائيات

Bobo 在平面上画了三条线段 $s_1$, $s_2$ 和 $s_3$。其中,线段 $s_i$ 的左端点是 $(a_i, y_i)$, 右端点是 $(b_i, y_i)$. 判断是否能找到三个点 $p_1$, $p_2$ 和 $p_3$ 使得

  • $p_i$ 在线段 $s_i$ 上;
  • $p_1$, $p_2$, $p_3$ 三点共线。

输入格式

输入文件包含多组数据,请处理到文件结束。

每组数据的第一行包含 $3$ 个整数 $a_1$, $b_1$, $y_1$. 第二行包含 $3$ 个整数 $a_2$, $b_2$ 和 $y_2$. 第三行包含 $3$ 个整数 $a_3$, $b_3$, 和 $y_3$.

  • $0 \leq a_i < b_i \leq 10^9$
  • $0 \leq y_1 < y_2 < y_3 \leq 10^9$
  • 数据组数不超过 $10^4$.

输出格式

对于每组数据,如果存在三点共线,输出 Yes,否则输出 No.

样例输入

0 1 0
0 1 1
0 1 2
0 1 0
1 2 1
0 1 2
0 1 0
2 3 1
0 1 2

样例输出

Yes
Yes
No
About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.