貌似x/y排个序
手动unique就好了
#include<bits/stdc++.h>
using namespace std;
const double eps=1e-16;
const double INF=1e16;
int cmp(double A){
if(fabs(A)<eps)return 0;
else return(A>0)?1:-1;
}
bool equal(double A,double B){
return (cmp(A-B)==0);
}
struct Point{
double x,y;
double Ang;
Point(double _x=0.0,double _y=0.0):x(_x),y(_y){}
friend Point operator + (Point A,Point B){return Point(A.x+B.x,A.y+B.y);}
friend Point operator - (Point A,Point B){return Point(A.x-B.x,A.y-B.y);}
friend Point operator * (Point A,double k){return Point(A.x*k,A.y*k);}
friend Point operator / (Point A,double k){return Point(A.x/k,A.y/k);}
void ang(){if(x!=0)Ang=y/x;else Ang=-1.23456789;}
void read(){scanf("%lf%lf",&x,&y);}
}p[4000];
typedef Point Vectors;
double Cross(Vectors A,Vectors B){
return (A.x*B.y-A.y*B.x);
}
Vectors len[50000];
int vis[50000]={};
int n;
int top=0;
bool cmpV(Vectors A,Vectors B){
return (cmp(A.Ang-B.Ang)<0);
}
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++){
p[i].read();
}
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
len[++top]=p[i]-p[j];
len[top].ang();
}
}
sort(len+1,len+1+top,cmpV);
int ans=0;
len[0].Ang=-0.123456789;
for(int i=1;i<=top;i++){
if(!equal(len[i].Ang,len[i-1].Ang)){
// cout<<len[i].Ang<<len[i].x<<" "<<len[i].y<<'\n';
ans++;
}
}
/*for(int i=1;i<=top;i++){
if(!vis[i]){
for(int j=i+1;j<=top;j++){
if(!vis[j]&&cmp(Cross(len[i],len[j]))==0)vis[j]=1;
}
}
}*/
/*int ans=0;
for(int i=1;i<=top;i++){
if(!vis[i]){
ans++;
// cout<<len[i].x/len[i].y<<'\n';
}
}*/
cout<<ans;
}