# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
853503 | esomer | Event Hopping (BOI22_events) | C++17 | 491 ms | 47156 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;
#define endl "\n"
struct segTree{
vector<pair<int, int>> mn;
int sz;
void init(int n){
sz = 1;
while(sz < n) sz *= 2;
mn.assign(2 * sz, {2e9, 2e9});
}
void set(int i, pair<int, int> val, int x, int lx, int rx){
if(rx - lx == 1){
mn[x] = val;
return;
}
int m = (lx + rx) / 2;
if(i < m) set(i, val, 2 * x + 1, lx, m);
else set(i, val, 2 * x + 2, m, rx);
mn[x] = min(mn[2 * x + 1], mn[2 * x + 2]);
}
void set(int i, pair<int, int> val){
set(i, val, 0, 0, sz);
}
pair<int, int> calc(int l, int r, int x, int lx, int rx){
if(lx >= l && rx <= r) return mn[x];
else if(lx >= r || rx <= l) return {2e9, 2e9};
# | 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... |