显示代码纯文本
//dudu present
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<queue>
#include<vector>
#include<stack>
#include<cmath>
#include<algorithm>
#include<map>
#include<set>
#include<time.h>
using namespace std;
int N;
struct point
{
int x,y;
};
point a[101];
void read()
{
cin>>N;
for(int i=1;i<=N;i++)
cin>>a[i].x>>a[i].y;
}
int ans=1;
void sovle()
{
for(int i=1;i<=N;i++)
{
for(int j=i+1;j<=N;j++)
{
int num=2;
if(a[i].x!=a[j].x||a[j].y!=a[i].y){
for(int k=j+1;k<=N;k++)
{
if((a[j].y-a[i].y)*(a[k].x-a[i].x)==(a[k].y-a[i].y)*(a[j].x-a[i].x))
num++;
}
if(num>ans) ans=num;
}
}
}
cout<<ans<<endl;
}
int main()
{
freopen("asm_fuel.in","r",stdin);
freopen("asm_fuel.out","w",stdout);
//double a=clock(),b;
read();
sovle();
//b=clock();
//cout<<b-a;
return 0;
}