# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
926804 | Art_ogo | Race (IOI11_race) | C++17 | 9 ms | 28664 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>
#include "race.h"
#define ve vector
#define ll long long
#define fi first
#define se second
using namespace std;
typedef pair<ll, ll> pll;
const int MAXN = 1e6 + 10;
ll k;
ve<pll> g[MAXN];
map<ll, ll>* st[MAXN];
pll add[MAXN];
ll res;
void dfs(int v, int p){
pll mx = {-1, -1};
for(auto& to : g[v])
if(to.fi != p){
dfs(to.fi, v);
if(mx.fi == -1 || st[to.fi]->size() > st[mx.fi]->size())
mx = to;
}
if(mx.fi == -1){
st[v] = new map<ll, ll>();
# | 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... |