# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
878255 | Soshi85 | Railway (BOI17_railway) | C++14 | 60 ms | 23236 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;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
#define pb push_back
#define F first
#define S second
//#define mp make_pair
#define all(x) x.begin(),x.end()
#define file freopen("closing.in", "r", stdin);freopen("closing.out", "w", stdout);
#define kill(x) {cout << x << '\n'; return 0;}
//#define int ll
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("avx2")
const int N = 1e5 + 110, LG = 18, MOD = 1e9+9;
const ll inf = 1e12;
int n, m, k, d[N], anc[N][LG], dp[N];
vector<int> g[N];
vector<pii> edge;
void dfs(int v = 0, int p = -1) {
for(int i = 1; i < LG; ++i) anc[v][i] = anc[anc[v][i-1]][i-1];
for(int u : g[v]) {
if(u ^ p) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |