# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1172401 | DanielPr8 | Railway (BOI17_railway) | C++20 | 36 ms | 21172 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvl = vector<vll>;
using pll = pair<ll,ll>;
using vpl = vector<pll>;
using vvp = vector<vpl>;
#define f first
#define s second
#define pb push_back
#define all(v) v.begin(),v.end()
vll ed, sz;
vpl ord;
vvp g;
void dfs(ll cr, ll pr){
ord.pb({cr, -1});
for(pll i:g[cr]){
if(i.f!=pr){
ord.back() = {cr, i.s};
dfs(i.f,cr);
}
}
}
int main(){
ios_base::sync_with_stdio(0);cin.tie(NULL);
ll n, m, k, a ,b, s;
cin >> n >> m >> k;
g = vvp(n);
for(ll i = 0; i < n-1; ++i){
# | 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... |