# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
227319 | abeker | Matching (COCI20_matching) | C++17 | 967 ms | 104332 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 pair <int, int> pii;
const int MAXN = 1e5 + 5;
const int offset = 1 << 17;
struct Segment {
int x1, y1, x2, y2;
};
class Tournament {
set <pii> S[2 * offset];
public:
void update(int x, int lo, int hi, int from, int to, pii p) {
if (lo >= to || hi <= from)
return;
if (lo >= from && hi <= to) {
S[x].insert(p);
return;
}
int mid = (lo + hi) / 2;
update(2 * x, lo, mid, from, to, p);
update(2 * x + 1, mid, hi, from, to, p);
}
vector <int> query(int x, int from, int to) {
vector <int> res;
for (x += offset; x; x /= 2)
while (1) {
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... |