# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
866271 | danikoynov | Circle selection (APIO18_circle_selection) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}