# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1158341 | eudhsyf | Race (IOI11_race) | C++20 | 3 ms | 5696 KiB |
#include <bits/stdc++.h>
#include "race.h"
using namespace std;
#define fi first
#define pb push_back
#define eb emplace_back
#define se second
typedef long long ll;
using pii = pair<int, int>;
const int nmax = 2e5 + 5, inf = 1e9;
int n, k, h[nmax][2], l[nmax];
int vis[nmax], sz[nmax];
vector<pii> adj[nmax];
unordered_map<int, int> mpa, mp;
int size(int u, int p = -1)
{
sz[u] = 1;
for (auto [v, w] : adj[u])
{
if (v != p && !vis[v])
{
sz[u] += size(v, u);
}
}
return sz[u];
}
int find(int u, int n, int p = -1)
# | 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... |