# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
833724 | kingfran1907 | 경주 (Race) (IOI11_race) | C++14 | 118 ms | 36400 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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);
if (s[tren].size() > s[x].size()) {
//printf("child is larger\n");
# | 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... |