# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
579663 | wdjpng | Event Hopping (BOI22_events) | C++17 | 275 ms | 40964 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>
#define int long long
#define rep(i,n) for(int i = 0; i < n; i++)
#define per(i,n) for(int i = n-1; i >=0; i--)
#define all(a) a.begin(), a.end()
#define pii pair<int,int>
using namespace std;
vector<pii>T(1e6,{1e15,-1});
pii update(int i, int l, int r, int ui, pii uv)
{
if(r<=ui||l>ui) return T[i];
if(l+1==r) return T[i]=min(T[i],uv);
return T[i] = min(update(2*i,l,(l+r)/2,ui,uv),update(2*i+1,(l+r)/2,r,ui,uv));
}
pii query(int i, int l, int r, int ql, int qr)
{
if(qr<=l||r<=ql) return {1e15,-1};
if(l>=ql&&r<=qr) return T[i];
return min(query(2*i,l,(l+r)/2,ql,qr),query(2*i+1,(l+r)/2,r,ql,qr));
}
struct ev {int s,e;};
bool path(ev a, ev b)
{
return b.s<=a.e&&b.e>=a.e;
# | 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... |