# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98087 | SpeedOfMagic | Race (IOI11_race) | C++17 | 916 ms | 46692 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>
#include "race.h"
using namespace std;
template<typename T> using v = vector<T>;
typedef vector<int> vint;
#define rep(a, l, r) for(int a = (l); a < (r); a++)
#define pb push_back
#define fs first
#define sc second
#define sz(a) ((int) a.size())
//code starts here
const int maxN = 2e5 + 1;
char vis[maxN];
int siz[maxN];
v<pair<int, int>> t[maxN];
int calcSiz(int cur, int p) {
siz[cur] = 1;
for (auto i : t[cur])
if (i.fs != p && !vis[i.fs])
siz[cur] += calcSiz(i.fs, cur);
return siz[cur];
}
const int maxK = 1e6 + 1;
pair<pair<int, int>, pair<int, int>> d[maxK];
int version[maxK];
int curVersion = 0;
int num;
# | 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... |