# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
461182 | KazamaHoang | Race (IOI11_race) | C++14 | 638 ms | 34036 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>
#define F first
#define S second
#define eb emplace_back
#define bit(x, i) (((x) >> (i)) & 1)
using namespace std;
using ll = long long;
const int inf = 1061109567;
const ll INF = 4557430888798830399;
const int MOD = 998244353;
int n, lenRace;
vector <pair <int, int>> adj[200005];
int subtree_size[200005];
int minDepth[1000005];
bool vis[200005];
int res = inf;
int dfs(int u, int par) {
int &ret = subtree_size[u];
ret = 1;
for (auto pii : adj[u]) {
int v = pii.F;
if (v != par && !vis[v])
ret += dfs(v, u);
}
return ret;
}
# | 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... |