# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
32808 | Mamnoon_Siam | Race (IOI11_race) | C++14 | 2176 ms | 162272 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>
using namespace std;
#define wait() system("pause")
#define clock_starts() clock_t begin = clock()
#define clock_ends() clock_t end = clock()
#define print_running_time() double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC; \
printf("Elapsed Time : %.10f second(s)\n", elapsed_secs)
#define read(s) freopen(s, "r", stdin)
#define write(s) freopen(s, "w", stdout)
#define debug(s) cout<< #s <<" = "<< s <<endl
#define int long long
#define inf 1000000000000000000LL
const int maxn = 200010;
bool onCtree[maxn]; int n, k;
vector<pair<int, int>> v[maxn];
vector<int> ctree[maxn], subtree[maxn];
int level[maxn], T[19][maxn], sub[maxn], D[maxn], parent[maxn];
map<int, int> mp; int ret = inf;
vector<int> eulerTour; int lg[maxn*2], where[maxn], table[19][maxn*2];
void preCalc(int p, int node, int l, int d) {
level[node] = l; eulerTour.push_back(node);
D[node] = d, T[0][node] = parent[node] = p;
for(auto b : v[node]) {
if(b.first != p) {
preCalc(node, b.first, l+1, d+b.second);
eulerTour.push_back(node);
# | 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... |