显示代码纯文本
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<queue>
#include<set>
#include<cmath>
const int maxn = 300;
using namespace std;
#define INF 0x3fffffff
inline int read()
{
int x = 0, f = 1;
char ch = getchar();
while(ch < '0' || ch > '9') {if(ch == '-') f = -1; ch = getchar();}
while(ch >= '0' && ch <= '9') {x = x * 10 + ch - '0'; ch = getchar();}
return x * f;
}
struct poi {
int x, y;
}a[maxn];
int m, n, Ar, Sa;
int tot, cnt, sum, ans1, ans = -INF;
bool cmp(const poi i, const poi j) {
if( i.x != j.x) return i.x < j.x;
else return i.y < j.y;
}
void init()
{
n = read();
for(int i = 1; i <= n; i++)
a[i].x = read(), a[i].y = read();
//sort(a + 1, a + n + 1, cmp);
}
int main()
{
freopen("asm_fuel.in", "r", stdin);
freopen("asm_fuel.out", "w", stdout);
init();
for(int i = 1; i <= n; i++)
for(int j = i + 1; j <= n; j++) {
int now = 0;
if(a[i].x == a[j].x && a[i].y == a[j].y) continue;
for(int k = 1; k <= n; k++) {
if( (a[k].x - a[i].x) * (a[k].y - a[j].y) == (a[k].x - a[j].x) * (a[k].y - a[i].y) ) now++;
}
ans = max(ans, now);
}
cout<<ans<<endl;
return 0;
}