# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
8832 | gs14004 | Wall (IOI14_wall) | C++98 | 1408 ms | 49540 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 <cstdio>
#include <utility>
#include <algorithm>
using namespace std;
typedef pair<int,int> pi;
int* res;
struct segtree{
pi tree[4200000];
void upload(int op, int p, int v){
if(op == 1){
tree[p].first = max(tree[p].first,v);
tree[p].second = max(tree[p].second,v);
}
else{
tree[p].first = min(tree[p].first,v);
tree[p].second = min(tree[p].second,v);
}
}
void insert(int s, int e, int p, int ps, int pe, int v, int op){
if(pe < s || e < ps) return;
if(s <= ps && pe <= e){
upload(op,p,v);
res[s] = tree[p].first;
}
else{
upload(1,2*p,tree[p].first);
upload(2,2*p,tree[p].second);
upload(1,2*p+1,tree[p].first);
# | 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... |