# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98997 | Hideo | Race (IOI11_race) | C++14 | 890 ms | 33400 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>
//#include "grader.cpp"
using namespace std;
#define mk make_pair
#define pb push_back
#define sc second
#define fr first
#define pii pair < int, int >
#define vii vector < pii >
const int MAXN = 2e5 + 7;
const int MAXK = 1e6 + 7;
const int INF = 1e9 + 7;
int ans = INF, k, t;
int st[MAXK], mt[MAXK], h[MAXN], del[MAXN];
vii g[MAXN];
void dfs (int v, int p = -1){
h[v] = 1;
for (pii to : g[v])
if (to.fr != p && !del[to.fr])
dfs(to.fr, v);
if (p != -1)
h[p] += h[v];
}
# | 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... |