# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
630200 | qwerasdfzxcl | Radio Towers (IOI22_towers) | C++17 | 1367 ms | 51488 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 "towers.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, a[100100], b[100100], typ[100100];
vector<int> T;
struct Node{
int x, l, r;
Node(){}
Node(int _x, int _l, int _r): x(_x), l(_l), r(_r) {}
};
struct PST{
Node tree[4004000];
int root[100100], pt1, pt2, sz;
void init(int n){
sz = n;
tree[0] = Node(0, -1, -1);
root[0] = 0;
pt1 = 1, pt2 = 1;
}
void add(){
tree[pt1] = tree[root[pt2-1]];
root[pt2] = pt1;
++pt1, ++pt2;
}
int _new(int i){
if (i!=-1) tree[pt1++] = tree[i];
else tree[pt1++] = Node(0, -1, -1);
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |