版本2和3间的区别
于2006-04-21 20:36:45修订的的版本2
大小: 1300
编辑: czk
备注:
于2008-02-23 15:34:10修订的的版本3
大小: 1300
编辑: localhost
备注: converted to 1.6 markup
未发现区别!

Rabbit hunt

http://acm.timus.ru/problem.aspx?space=1&num=1052

Time Limit: 2.0 second

Memory Limit: 1 000 KB

A good hunter kills two rabbits with one shot. Of course, it can be easily done since for any two points we can always draw a line containing the both. But killing three or more rabbits in one shot is much more difficult task. To be the best hunter in the world one should be able to kill the maximal possible number of rabbits. Assume that rabbit is a point on the plane with integer x and y coordinates. Having a set of rabbits you are to find the largest number K of rabbits that can be killed with single shot, i.e. maximum number of points lying exactly on the same line. No two rabbits sit at one point.

1. Input

An input contains an integer N (2<=N<=200) specifying the number of rabbits. Each of the next N lines in the input contains the x coordinate and the y coordinate (in this order) separated by a space (-1000<=x,y<=1000).

2. Output

The output contains the maximal number K of rabbits situated in one line.

3. Sample Input

6
7 122
8 139
9 156
10 173
11 190
-100 1

4. Sample Output

5

Problem Author: Vasiljev S.


timus1052 (2008-02-23 15:34:10由localhost编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.