# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1165732 | _rain_ | Factories (JOI14_factories) | C++17 | 2926 ms | 336176 KiB |
#include<bits/stdc++.h>
//#include "factories.h"
using namespace std;
typedef long long LL;
const int N=(int)1e6;
const int MAXLOG=19;
const LL INF=1e18+7;
vector<pair<int,int>>ke[N+2];
#define fi first
#define se second
void add_canh(int u,int v,int c){
ke[u].push_back({v,c}),ke[v].push_back({u,c});
return;
}
class Centroid{
private:
vector<int>par,sub;
vector<LL>mx;
vector<bool>del;
vector<LL>d;
vector<vector<pair<int,LL>>>pr;
public:
void init_size(int _n){
par.resize(_n+2,0);
sub.resize(_n+2,0);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |