Posted on 2008-04-15 15:32
superman 阅读(240)
评论(0) 编辑 收藏 引用 所属分类:
URAL
1 /* Accepted 0.046 200 KB */
2 #include <iostream>
3
4 using namespace std;
5
6 int main()
7 {
8 struct { int x, y; } p[200];
9
10 int n;
11 cin >> n;
12 for(int i = 0; i < n; i++)
13 cin >> p[i].x >> p[i].y;
14
15 int max = 0;
16 for(int i = 0; i < n; i++)
17 for(int j = 0; j < n; j++)
18 if(i != j)
19 {
20 int x = p[j].x - p[i].x;
21 int y = p[j].y - p[i].y;
22
23 int cnt = 2;
24 for(int k = 0; k < n; k++)
25 if(k != i && k != j)
26 if(x * (p[k].y - p[i].y) == y * (p[k].x - p[i].x))
27 cnt++;
28 if(max < cnt)
29 max = cnt;
30 }
31
32 cout << max << endl;
33
34 return 0;
35 }
36