按理说不该TLE啊
#include<bits/stdc++.h>
using namespace std;
int ans,n,cnt,T,idx,temp1,temp2;
struct node{
int x,y;
}a[1000010];
int main()
{
cin>>T;
while(T--)
{
idx=0;
while(scanf("%d%d",&temp1,&temp2)!=EOF)
{
a[++idx].x=temp1;
a[idx].y=temp2;
}
for(int i=1;i<idx;i++)
{
for(int j=i+1;j<=idx;j++)//两点确定一条直线
{
cnt=0;
node vec1,vec2;//平面向量
vec1.x=a[j].x-a[i].x;
vec1.y=a[j].y-a[i].y;
for(int k=j+1;k<=idx;k++)
{
vec2.x=a[k].x-a[i].x;
vec2.y=a[k].y-a[i].y;
if(vec1.x*vec2.y==vec1.y*vec2.x)
cnt++;
}
ans=max(ans,cnt);
}
}
printf("%d\n",ans);
}
return 0;
}