# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1172065 | Ludissey | File Paths (BOI15_fil) | C++20 | 11 ms | 9284 KiB |
#include <bits/stdc++.h>
#define int long long
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
using namespace std;
vector<vector<int>> child;
vector<int> depth;
vector<int> a;
vector<int> f;
vector<int> parent;
vector<int> file;
vector<int> dv;
vector<vector<int>> divs;
vector<pair<int,int>> it;
int n,m,k,s;
int in=-1;
int c=1;
void prep(int x, int d){
d+=a[x];
depth[x]=d;
if(x>=n-m) { file.push_back(x); in++; }
else it[x].first=in+1;
for (auto u : child[x]) prep(u,d);
if(x<n-m) it[x].second=in;
}
void findSUM(int x, int d){
d+=a[x];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |