# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
136213 | mosesmayer | Wall (IOI14_wall) | C++17 | 1222 ms | 162164 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 <cstdio>
#define max(a, b) (a > b ? a : b)
#define min(a, b) (a < b ? a : b)
typedef long long LL;
const LL LINF = 1000000000LL * 1000000000LL;
const int mxsz = 2e6 + 3;
struct Node{
LL top, bot;
Node(){
top = 0;
bot = LINF;
}
Node operator+ (const Node &r) const{
Node ret;
ret.top = max(top, r.top);
ret.bot = min(bot, r.bot);
return ret;
}
};
struct Seg{
Node st[mxsz << 2];
void prop(int p, int l, int r){
if (l == r) return;
for (int i = (p<<1); i <= (p<<1|1); i++){
st[i].bot = min(st[i].bot, st[p].bot);
st[i].bot = max(st[i].bot, st[p].top);
st[i].top = max(st[i].top, st[p].top);
st[i].top = min(st[i].top, st[p].bot);
# | 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... |