# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
268391 | imeimi2000 | Interval Collection (CCO20_day2problem2) | C++17 | 1469 ms | 198260 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;
const int inf = 1e8, n = 1e6;
template <int X>
struct PQ {
priority_queue<int> pq1, pq2;
void push(int x) {
pq1.push(x * X);
}
void pop(int x) {
pq2.push(x * X);
while (!pq2.empty() && pq1.top() == pq2.top()) {
pq1.pop();
pq2.pop();
}
}
int top() {
if (pq1.empty()) return -inf * X;
return pq1.top() * X;
}
};
const int sz = 1 << 20;
PQ<1> L[sz], Ls;
PQ<-1> R[sz], Rs;
struct node {
int l, r, m;
# | 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... |