# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
213249 | DodgeBallMan | Constellation 3 (JOI20_constellation3) | C++14 | 523 ms | 39416 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>
#define pii pair<int, int>
#define x first
#define y second
using namespace std;
const int N = 2e5 + 10;
vector<int> peak[N];
int par[N], l[N], r[N], chk[N], n, k;
long long seg[4*N], lz[4*N], sum;
vector<pii> starx[N], stary[N];
int find( int x ) { return x == par[x] ? x : par[x] = find( par[x] ); }
void merge( int a, int b ) {
a = find( a ), b = find( b );
if( a == b ) return ;
par[b] = a, l[a] = min( l[a], l[b] ), r[a] = max( r[a], r[b] );
}
void push( int l, int r, int idx ) {
if( lz[idx] != 0 ) {
seg[idx] += lz[idx];
if( l != r ) lz[idx<<1] += lz[idx], lz[idx<<1|1] += lz[idx];
lz[idx] = 0;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |