# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
539217 | cadmiumsky | Circle selection (APIO18_circle_selection) | C++17 | 2214 ms | 94028 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;
using ll = long long;
namespace Cercus {
unordered_map<int, unordered_map<int, vector<int> > > cont;
int lastr = 2e9 + 5;
vector<tuple<int, int, int> > v;
vector<int> sorted, elim;
int xx[2], yy[2], rr[2];
ll p2(ll x) { return x * x; }
bool check(int i, int j) {
tie(rr[0], xx[0], yy[0]) = v[i];
tie(rr[1], xx[1], yy[1]) = v[j];
return p2(xx[0] - xx[1]) + p2(yy[0] - yy[1]) <= p2(rr[0] + rr[1]);
}
void redocontainer(int nr) {
lastr = nr;
for(int i = 0, x, y, r; i < v.size(); i++) {
if(elim[i] == -1) {
tie(r, x, y) = v[i];
cont[x / (2 * nr)][y / (2 * nr)].push_back(i);
}
}
}
void gothrough(int ind) {
if(elim[ind] != -1)
return;
int x, y, r;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |