# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1127065 | Ludissey | Factories (JOI14_factories) | C++20 | 5816 ms | 439520 KiB |
#include "factories.h"
#include <bits/stdc++.h>
#define int long long
#define sz(a) (int)a.size()
#define all(a) a.begin(), a.end()
using namespace std;
vector<vector<pair<int,int>>> neigh;
vector<pair<int,int>> parent;
vector<vector<int>> parent2;
vector<vector<pair<int,int>>> parents;
vector<int> childC;
vector<int> cindx;
vector<int> depth;
vector<int> depthD;
vector<int> ans;
int n;
int K;
int ct=0;
int _n=0;
int solu=1e18;
const int LOG=18;
int build_tree(int x, int p){
childC[x]=1;
for (int t=0; t<sz(neigh[x]); t++)
{
int u=neigh[x][t].first;
if(u==p||cindx[u]>=0) continue;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |