# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
81900 | aquablitz11 | Port Facility (JOI17_port_facility) | C++14 | 99 ms | 99084 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 pii = pair<int, int>;
#define x first
#define y second
const int N = 1<<20;
const int MOD = 1e9+7;
int n, ans = 1;
pii A[N];
pii ev[N<<1];
int col[N];
set<pii> seg[N<<1];
void add(int i, pii x, int p=1, int b=0, int e=2*n-1) {
seg[p].insert(x);
if (b == e)
return;
int m = (b+e)/2;
if (i <= m)
add(i, x, p<<1, b, m);
else
add(i, x, p<<1|1, m+1, e);
}
void remove(int i, pii x, int p=1, int b=0, int e=2*n-1) {
seg[p].erase(x);
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... |