# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
442038 | Abrar_Al_Samit | Putovanje (COCI20_putovanje) | C++17 | 187 ms | 49896 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>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define debug(x) cerr << '[' << (#x) << "] = " << x << '\n';
template<class T> using ordered_set = tree<T, null_type , less<T> , rb_tree_tag , tree_order_statistics_node_update> ;
const int maxn = 2e5 + 5;
//https://oj.uz/problem/view/COCI20_putovanje
struct Edge{
long long to;
long long single, multi;
};
vector<Edge>g[maxn];
long long ans = 0, sub[maxn];
int tin[maxn], tout[maxn], timer, l;
vector<vector<int>>up(maxn, vector<int>(20));
void dfs(int node, int parent, Edge to_parent) {
for(Edge e : g[node]) {
if(e.to!=parent) {
dfs(e.to, node, e);
sub[node] += sub[e.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... |