# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
173045 | LinusTorvaldsFan | Bigger segments (IZhO19_segments) | C++14 | 917 ms | 25208 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;
typedef long long ll;
const int Q=1<<19;
ll tree[2*Q];
ll inf;
void update(int p, ll x) {
p+=Q;
tree[p]=x;
p/=2;
while(p>0){
tree[p]=min(tree[2*p],tree[2*p+1]);
p/=2;
}
}
ll get(int l, int r) {
ll ans=inf;
for(l+=Q,r+=Q;l<r;l>>=1,r>>=1){
if(l&1)ans=min(ans,tree[l++]);
if(r&1)ans=min(ans,tree[--r]);
}
return ans;
}
# | 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... |