# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
362231 | lohacho | Krave (COI14_krave) | C++14 | 625 ms | 53692 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;
struct Seg{
long long n;
long long inf = (long long)1e9;
vector<vector<long long>> tree;
Seg(){}
Seg(long long N):n(N){
tree.resize(n * 4);
for(long long i = 0; i < n * 4; ++i){
tree[i] = {inf, -inf};
}
}
void push(long long x, long long l, long long r, long long pl, long long pr, vector<long long> val){
if(pr < l || pl > r) return;
if(l >= pl && r <= pr){
tree[x][0] = min(tree[x][0], val[0]);
tree[x][1] = max(tree[x][1], val[1]);
return;
}
long long mid = (l + r) >> 1;
push(x * 2, l, mid, pl, pr, val), push(x * 2 + 1, mid + 1, r, pl, pr, val);
tree[x][0] = min(tree[x * 2][0], tree[x * 2 + 1][0]);
tree[x][1] = max(tree[x * 2][1], tree[x * 2 + 1][1]);
}
long long left(long long x, long long l, long long r, long long fl, long long fr, long long val){
if(fr < l || fl > r) return inf;
if(tree[x][0] > val || tree[x][1] < val) return inf;
# | 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... |
# | 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... |