# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
866271 | danikoynov | Circle selection (APIO18_circle_selection) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
struct point
{
int x, y;
point(int _x = 0, int _y = 0)
{
x = _x;
y = _y;
}
void get()
{
cin >> x >> y;
}
};
struct circle
{
point centre;
int radius, idx;
circle(point _centre = point(), int _radius = 0, int _idx = 0)
{
centre = _centre;
radius = _radius;
idx = _idx;
}
void get()
{
centre.get();
cin >> radius;
}
};
const int maxn = 3e5 + 10;
const int inf = 1e9 + 10;
bool cmpx(circle c1, circle c2)
{
return c1.centre.x < c2.centre.x;
}
bool cmpy(circle c1, circle c2)
{
return c1.centre.y < c2.centre.y;
}
void sort_arrays()
{
sort(cx + 1, cx + n + 1, cmpx);
sort(cy + 1, cy + n + 1, cmpy);
}
int n;
circle c[maxn], cx[maxn], cy[maxn];
void input()
{
cin >> n;
for (int i = 1; i <= n; i ++)
{
c[i].get();
c[i].idx = i;
cx[i] = cy[i] = c[i];
}
}
vector < vector < circle > > field;
bool eliminated[maxn];
void restructure(int block)
{
vector < int > dx;
int last = -inf;
for (int i = 1; i <= n; i ++)
{
}
}
void simulate()
{
}
void solve()
{
input();
sort_arrays();
simulate();
}
int main()
{
solve();
return 0;
}