# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
833747 | kingfran1907 | Race (IOI11_race) | C++14 | 446 ms | 104588 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 "race.h"
#include <bits/stdc++.h>
#define X first
#define Y second
using namespace std;
typedef long long llint;
const int maxn = 2e5+10;
const int maxk = 1e6+10;
const int inf = 0x3f3f3f3f;
int n, k;
vector< pair<int, int> > graph[maxn];
map< llint, llint > s[maxn];
llint sol = inf;
llint ofx[maxn], ofy[maxn];
void solve(int x, int parr) {
//printf("solving: %d %d\n", x, parr);
s[x][0] = 0;
for (auto iter : graph[x]) {
int tren = iter.X;
int cost = iter.Y;
if (tren == parr) continue;
solve(tren, x);
//printf("merging %d %d\n", x, tren);
ofx[tren] += cost;
ofy[tren]++;
# | 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... |