我们个人赛的一个题目,简单的计算几何,在聊题目之前,我想先聊聊我的心路历程。。。写了150行斜率和截距判断的函数后,突然发现其实根本不需要。。。然后改叉积就50行就过了,emmmm。
目录
题目链接:
http://codeforces.com/problemset/problem/961/D
题目:
D. Pair Of Lines
time limit per test 2 seconds
memory limit per test 256 megabytes
You are given n points on Cartesian plane. Every point is a lattice point (i. e. both of its coordinates are integers), and all points are distinct.
You may draw two straight lines (not necessarily distinct). Is it possible to do this in such a way that every point lies on at least one of these lines?
Input
The first line contains one integer n (1 ≤ n ≤ 105) — the number of points you are given.
T