# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1169755 | daoquanglinh2007 | Grapevine (NOI22_grapevine) | C++20 | 1277 ms | 242612 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair <int, int>
#define fi first
#define se second
#define mp make_pair
#define isz(a) (int)(a).size()
const int NM = 1e5;
const ll inf = 1e18, LIM = 1e16;
struct node{
ll d, res;
};
int n, q, sz[NM+5], num[NM+5], parent_cen[NM+5], timer;
bool del[NM+5];
vector <pii> adj[NM+5];
vector <int> vlist[NM+5], tin[NM+5], tout[NM+5], tour[NM+5], f[NM+5];
vector <ll> d[NM+5], lazy[NM+5];
vector <node> st[NM+5];
vector <int> tmp;
map <pii, int> len;
void dfs_sz(int u, int p){
sz[u] = 1;
tmp.push_back(u);
for (pii _ : adj[u]){
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |