# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
7406 | ainta | Wall (IOI14_wall) | C++98 | 992 ms | 57688 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<algorithm>
using namespace std;
#define SZ 2097152
int Res[SZ], N;
struct SegTree{
int B, E;
}IT[SZ*2+2];
void spread(int node){
IT[node * 2].B = min(max(IT[node * 2].B, IT[node].B), IT[node].E);
IT[node * 2 + 1].B = min(max(IT[node * 2 + 1].B, IT[node].B), IT[node].E);
IT[node * 2].E = min(max(IT[node * 2].E, IT[node].B), IT[node].E);
IT[node * 2 + 1].E = min(max(IT[node * 2 + 1].E, IT[node].B), IT[node].E);
}
void UDT(int node){
IT[node].B = min(IT[node * 2].B, IT[node * 2 + 1].B);
IT[node].E = max(IT[node * 2].E, IT[node * 2 + 1].E);
}
void Ins(int node, int b, int e, int s, int l, int h, int ck){
if (b == s && e == l){
if (ck == 1){
IT[node].B = max(IT[node].B, h);
IT[node].E = max(IT[node].E, h);
}
else{
IT[node].B = min(IT[node].B, h);
IT[node].E = min(IT[node].E, h);
}
return;
}
# | 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... |