# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
389948 | ritul_kr_singh | Wall (IOI14_wall) | C++17 | 1032 ms | 56804 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;
//#define int long long
#define sp << ' ' <<
#define nl << '\n'
#include "wall.h"
const int INF = 1e9;
struct SegmentTree{
using T = array<int, 2>;
vector<T> a;
int sz = 1;
T ID = {0, INF};
SegmentTree(int n){
while(sz < n) sz += sz;
a.assign(2*sz, ID);
}
void apply(T &x, T &y){
y[0] = max(y[0], x[0]);
y[1] = max(y[1], x[0]);
y[0] = min(y[0], x[1]);
y[1] = min(y[1], x[1]);
}
void push(int x){
if(a[x] == ID) return;
if(x+1<sz){
apply(a[x], a[2*x+1]);
apply(a[x], a[2*x+2]);
a[x] = ID;
# | 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... |