1 #include
2 #include
3 using namespace std;
4
5 typedef long long ll;
6 typedef char ch;
7 typedef double db;
8
9 int cmp(const void * a, const void * b)
10 {
11 return((*(double*)a-*(double*)b>0)?1:-1);
12 }
13
14 double x[10005] = {0};
15 double y[10005] = {0};
16 double l[10005] = {0};
17
18 int main()
19 {
20 int marker = 0;
21 int n = 0 , score = 0;
22
23 cin >> n;
24 for(int i = 0;i)
25 {
26 cin>>x[i]>>y[i];
27 }
28 int i = 0;
29 for(int j = 1;j<=n-1;j++)
30 {
31 for(int k = j+1;k)
32 {
33 if(x[j] == x[k])
34 {
35 marker = 1;
36 }
37 else
38 {
39 l[i] = double(y[k]-y[j])/(x[k]-x[j]);
40 i++;
41 }
42 }
43 }
44 //cout<
45 qsort(l,i,sizeof(l[0]),cmp);
46 /*
47 for(int j = 0;j48 {
49 cout<50 }
51 */
52 if(n > 2)
53 {
54 for(int j = 0;j1 ;j++)
55 {
56 if(l[j]!=l[j+1])score+=1;
57 }
58 score++;
59 }
60 if(marker)
61 {
62 score+=1;
63 //cout<<'!';
64 }
65 cout<endl;
66 return 0;
67 }