304449: CF849B. Tell Your World
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Tell Your World
题意翻译
题意 用线连接无数的点,直到我们到达远方。 坐标平面上有$n$ 个点,第$i$ 个点的坐标为$(i,y_{i})$ 。 确定是否能画两条平行且不重叠的线,使得集合中的每个点都在他们之中的一条线上,且每条线至少经过一个点。 输入格式: 第一行包含一个正整数$n$ $(3<=n<=1000)$ 。 第二行包含$n$ 个空间分离的整数$y_{1},y_{2},...,y_{n}$ $(-10^9<=y_{i}<=10^9)$ 。(每个点的纵坐标)。 输出格式: 如果可以满足所有要求,输出 "Yes",否则,输出 "No" 。题目描述
Connect the countless points with lines, till we reach the faraway yonder. There are $ n $ points on a coordinate plane, the $ i $ -th of which being $ (i,y_{i}) $ . Determine whether it's possible to draw two parallel and non-overlapping lines, such that every point in the set lies on exactly one of them, and each of them passes through at least one point in the set.输入输出格式
输入格式
The first line of input contains a positive integer $ n $ ( $ 3<=n<=1000 $ ) — the number of points. The second line contains $ n $ space-separated integers $ y_{1},y_{2},...,y_{n} $ ( $ -10^{9}<=y_{i}<=10^{9} $ ) — the vertical coordinates of each point.
输出格式
Output "Yes" (without quotes) if it's possible to fulfill the requirements, and "No" otherwise. You can print each letter in any case (upper or lower).
输入输出样例
输入样例 #1
5
7 5 8 6 9
输出样例 #1
Yes
输入样例 #2
5
-1 -2 0 0 -5
输出样例 #2
No
输入样例 #3
5
5 4 3 2 1
输出样例 #3
No
输入样例 #4
5
1000000000 0 0 0 0
输出样例 #4
Yes