# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
480704 | hidden1 | Railway (BOI17_railway) | C++14 | 167 ms | 36648 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;
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
#define endl "\n"
typedef long long ll;
template<class T, class T2> inline ostream &operator <<(ostream &out, const pair<T, T2> &x) { out << x.first << " " << x.second; return out;}
template<class T, class T2> inline istream &operator >>(istream &in, pair<T, T2> &x) { in >> x.first >> x.second; return in;}
template<class T, class T2> inline bool chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; }
template<class T, class T2> inline bool chkmin(T &x, const T2 &y) { return x > y ? x = y, 1 : 0; }
const ll mod = 1e9 + 7;
#ifndef LOCAL
#define cerr if(false) cerr
#endif
const ll MAX_N = 1e5 + 10, MAX_LOG = 20;;
vector<pair<ll, ll> > g[MAX_N];
ll par[MAX_N][MAX_LOG];
ll d[MAX_N];
ll ind[MAX_N], cnt[MAX_N];
ll in[MAX_N], out[MAX_N], tme;
vector<ll> ans;
ll n, m, k;
void dfs(ll x, ll p) {
par[x][0] = p;
for(ll i = 1; i < MAX_LOG; i ++) {
par[x][i] = par[par[x][i - 1]][i - 1];
}
d[x] = d[p] + 1;
Compilation message (stderr)
# | 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... |