# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
117444 | dragonslayerit | Wall (IOI14_wall) | C++14 | 682 ms | 66268 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 "wall.h"
#include <climits>
#include <algorithm>
#include <cassert>
#include <vector>
//clamps to [a,b]
struct Node{
int a,b;
Node():a(INT_MIN),b(INT_MAX){
}
Node(int a,int b):a(a),b(b){
assert(a<=b);
}
int eval(int x){
return std::max(a,std::min(b,x));
}
};
//apply l, then r
struct Node combine(struct Node l,struct Node r){
if(l.b<r.a) return Node(r.a,r.a);
if(l.a>r.b) return Node(r.b,r.b);
return Node(std::max(l.a,r.a),std::min(l.b,r.b));
}
struct Node st[1000005];
struct Node alt[500005];
std::vector<int> delta[500005];
int K;
# | 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... |