include iostream include vector include algorithm using namespace std

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct koor
{
int x;
int y;
};
vector <koor> vec;
bool mn(int n)
{
koor sered;
for (int i = 0; i < n; i++)
{
sered.x = vec[i].x;
sered.y = vec[i].y;
vec[i].x -= sered.x;
vec[i].y -= sered.y;
}
sered.x /= n;
sered.y /= n;
sort(vec.begin, vec.end, cmp);
for ()
}
bool cmp(koor a, koor b)
{
if (vect(a, b) > 0)
{
return true;
}
return false;
}
int vect(koor a, koor b)
{
return a.x*b.y - b.x*a.y;
}
int main()
{
int n;
cin >> n;
for (int i = 0; i < 500000000; i++)
{
for (int j = 0; j < n; j++)
{
koor qwe;
qwe.x = rand() % 50000;
qwe.y = rand() % 50000;
while (qwe.x + qwe.y > 50000)
{
qwe.x = rand() % 50000;
qwe.y = rand() % 50000;
}
vec.push_back(qwe);
}
}
}