# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1126250 | whoknow | Lampice (COCI19_lampice) | C++20 | 3253 ms | 13056 KiB |
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define MAXN 50005
#define ii pair<int,int>
#define bit(i,j) ((i>>j)&1)
#define sz(i) (int)i.size()
#define endl '\n'
using namespace std;
const int mod = 1e9 + 7, BASE = 31;
int n;
int a[MAXN];
vector<int>g[MAXN];
namespace sub1
{
bool ans ;
int sz[MAXN], h[MAXN];
int P[MAXN], up[MAXN], down[MAXN];
bool del[MAXN];
map<ll, bool>cnt[MAXN];
int dem(int u, int p)
{
int cnt = 1;
for(int v : g[u])
if(v != p && !del[v])
cnt += dem(v, u);
return sz[u] = cnt;
}
int centroid(int u, int p, int size)
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... |