# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
883862 | vjudge1 | Passport (JOI23_passport) | C++17 | 472 ms | 49652 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.
// author: erray
#include <bits/stdc++.h>
#ifdef DEBUG
#include "debug.h"
#else
#define debug(...) void(37)
#endif
using namespace std;
struct SegmentExtractor {
vector<vector<int>> segs;
int n;
SegmentExtractor(int _n) : n(_n) {
segs.resize(n << 1);
}
void push(int l, int r, int id) {
for (l += n, r += n + 1; l < r; l >>= 1, r >>= 1) {
if (l & 1) segs[l++].push_back(id);
if (r & 1) segs[--r].push_back(id);
}
}
template<typename F>
void extract(int p, F op) {
for (p += n; p > 0; p >>= 1) {
for (auto x : segs[p]) {
op(x);
}
segs[p].clear();
# | 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... |