# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
212740 | Alexa2001 | Constellation 3 (JOI20_constellation3) | C++17 | 408 ms | 63224 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;
const int Nmax = 2e5 + 5;
typedef long long ll;
const ll inf = 1e18;
int i, root, L[Nmax], R[Nmax], t[Nmax], H[Nmax];
multiset<pair<int,ll>> v[Nmax];
ll lazy[Nmax];
int n, m;
void cartesian_tree()
{
int i;
t[1] = 0; root = 1;
for(i=2; i<=n; ++i)
{
int node = i-1;
while(t[node] && H[node] < H[i])
node = t[node];
if(H[node] >= H[i])
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |