2016武汉科技大学邀请赛现场赛 B题

来源:互联网 发布:淘宝买家手机号提取 编辑:程序博客网 时间:2024/04/28 05:25

I Wanna Plant Trees!

Time Limit: 2 Sec  Memory Limit: 128 MB   64bit IO Format: %lld
Submitted: 80  Accepted: 17
[Submit][Status][Web Board]

Description

There are so many trees in WUST!
Now! ACMers from Wuhan is going to plant some trees in WUST!
First, they need to sell some trees (QAQ).
LL bought an excavator, it is said that the excavator is made by the School of Lanxiang and APTECH. It could dig out so many trees, but it is too noisy. So the excavator could only be used for once, and pass a straight line. It will dig out every tree on the line.
LL wants to know the maximum number of the trees could be dug out.
 

Input

The first line of input contains the number of test caseT(T<=10) . The descriptions of the test cases follow:
The first line of each test case contains a single positive integer n(n<=890)  - the number of the trees.
Each of the following line contains two integers, x and  y , the coordinate of each tree.
 

Output

 For each test case, output a single integer - maximum number of the trees could be dug out.

Sample Input

230 01 12 230 01 10 1

Sample Output

32


题意:平面上由n个点,现在要统计最多有多少个点在同一条直线上。


题解:这个要用STL,通过map去枚举所有的方向向量。

0 0