# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
522060 | Mahdi | Constellation 3 (JOI20_constellation3) | C++17 | 843 ms | 56140 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>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(v) v.begin(), v.end()
#define F first
#define S second
typedef long long ll;
typedef pair<int, int>pii;
typedef pair<ll, ll> pl;
typedef pair<ll, pl> pll;
const int N=2e5+5;
int n, m, sz, a[N], cl[N], cr[N], x[N], y[N], c[N], mx[4*N], la[4*N], p[N], td[N];
ll dp[N], pd[N], mm[N], ans[4*N], fuck;
vector<pii>u[N];
int max(int x, int lx, int rx, int l, int r){
if(lx>=r || rx<=l)
return n;
if(lx>=l && rx<=r)
return mx[x];
int mid=(lx+rx)/2;
int l1=max(2*x+1, lx, mid, l, r);
int r1=max(2*x+2, mid, rx, l, r);
if(a[l1]<=a[r1])
return r1;
return l1;
}
void max(int x, int lx, int rx, int l, int r, ll v){
if(rx<=l || lx>=r)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |