# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
237252 | DodgeBallMan | Fireworks (APIO16_fireworks) | C++14 | 86 ms | 14200 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 = 1e5 + 10;
long long high[N], slope[N], par[N];
int sz[N], hv[N], n, m;
priority_queue<long long> F;
vector<pii> g[N];
void dfs( int u, int p ) {
pii hh( 0, -1 );
sz[u] = 1;
for( pii v : g[u] ) if( v.x != p ) {
dfs( v.x, u );
par[v.x] = v.y;
sz[u] += sz[v.x];
hh = max( hh, pii( sz[v.x], v.x ) );
}
hv[u] = hh.y;
return ;
}
void sack( int u, int p, priority_queue<long long> &Q ) {
//printf("U : %d P : %d\n",u,p);
if( sz[u] == 1 ) {
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |