# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
442851 | mashrur_hossain | Putovanje (COCI20_putovanje) | C++17 | 243 ms | 65044 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>
#define fast_cin ios_base::sync_with_stdio(0); cin.tie(NULL); cerr.tie(NULL);
#define endl "\n"
#define dbg(x) cerr << #x << ": " << x << endl;
#define DBG cerr << __LINE__ << ": I GOT STUCK\n";
using namespace std;
typedef long long ll;
typedef long double db;
struct Edge{
ll to;
ll single, multi;
};
const ll mxn = 2e5 + 5;
ll n, LOG;
vector<Edge>adj[mxn];
vector<vector<ll>>up(mxn, vector<ll>(20));
ll in[mxn], out[mxn], sub[mxn];
ll timer, ans;
void dfs1(ll node, ll par, Edge to_parent){
for(Edge child: adj[node]){
if(child.to != par){
dfs1(child.to, node, child);
sub[node] += sub[child.to];
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |