Type n, k and the coordinates of n points:
# include
# include
# include
using namespace std;
Void ssort (vector
{
for( int i=0; I
for(int j=0; J
If (x [j] & gt; [j x + 1])
{
Swap (x [j], [x + 1]).
Swap ([j] y, y [j + 1));
}
}
}
}
Int getPartition (vector
{
Int keyVal=nums [height].
Int I=low - 1;
For (int j=low; J & lt; Height; J++)
{
If (nums [j] & gt;=keyVal)
{
I=I + 1;
Swap (nums [I], nums [j]);
}
}
Swap (nums [I + 1], the nums [height]);
Return the I + 1;
}
//iteration fast row
Void quicksot (vector
If (low
Int mid=getPartition (nums, low, height);
Quicksot (nums, low, mid - 1);
Quicksot (nums, mid + 1, height);
}
}
Int main ()
{
Int n, k;
Cin> N> k;
Vector
Vector
Vector
Int result=0;
Int t1, t2;
for(int i=0; I
Cin> T1 & gt;> t2;
X.p ush_back (t1);
Y.p ush_back (t2);
}
Cout
For (int i1=0; I1 & lt; n; I1 + +)
{
For (int j1=i1 + 1; J1 & lt; n; J1 + +)
{
Result=(y (j1) - y/i1)/(x (j1) - x/i1);
Cout
}
}
Quicksot (kk, 0, kk. The size () - 1);
Cout
return 0;
}