# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
166021 | JustInCase | Race (IOI11_race) | C++17 | 651 ms | 33016 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 <iostream>
#include <vector>
#include <cstring>
const int32_t MAX_N = 2e5;
const int32_t MAX_K = 1e6;
#ifdef LOCAL
#include "grader.cpp"
#endif
#ifndef LOCAL
#include "race.h"
#endif
struct Vertex {
bool solved;
int32_t subtree;
std::vector< std::pair< int32_t, int32_t > > v;
};
int32_t k, ans = -1, dists[MAX_K + 5];
Vertex g[MAX_N + 5];
void dfs_subtree(int32_t u, int32_t par) {
g[u].subtree = 1;
for(auto &e : g[u].v) {
auto v = e.first;
if(!g[v].solved && v != par) {
dfs_subtree(v, u);
g[u].subtree += g[v].subtree;
# | 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... |