# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
885606 | alexdd | Hard route (IZhO17_road) | C++17 | 10 ms | 43232 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("O3,unroll-loops")
using namespace std;
int n;
vector<int> con[500005];
map<int,pair<int,pair<int,int>>> dp[500005];
int root;
int depth[500005];
int siz[500005];
int maxd[500005];
int sus[500005];
int parent[500005];
pair<int,int> mxm = {0,0};
pair<int,pair<int,int>> combine(pair<int,pair<int,int>> x, pair<int,pair<int,int>> y)
{
if(x.second.second==0)
return y;
if(y.second.second==0)
return x;
if(x.first > y.first)
return x;
if(x.first < y.first)
return y;
return {x.first, {x.second.first + y.second.first, x.second.second + y.second.second}};
}
void add_mxm_brut(int nod, set<pair<int,int>> s)
{
for(auto adj:con[nod])
{
if(adj==parent[nod])
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... |