# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1103641 | SalihSahin | Parkovi (COCI22_parkovi) | C++14 | 801 ms | 56600 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 pb push_back
#define int long long
using namespace std;
const int mod = 998244353;
const int inf = 1e17;
const int N = 2e5+5;
const int W = 1e9;
vector<pair<int, int> > adj[N];
vector<int> distopar(N);
vector<int> taken, vis(N);
array<int, 3> dfs(int node, int par, int limit, bool tk){ // max distance, park count
vector<array<int, 3> > ch;
for(auto itr: adj[node]){
if(itr.first != par){
distopar[itr.first] = itr.second;
array<int, 3> arr = dfs(itr.first, node, limit, tk);
ch.pb(arr);
}
}
array<int, 3> calc = {0, 0, 0};
int mn = inf;
for(auto itr: ch){
if(itr[2] == 0) mn = min(mn, itr[0]);
}
for(auto itr: ch){
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... |