# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1136021 | banh@@notpro33 | Džumbus (COCI19_dzumbus) | C++20 | 37 ms | 33092 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
#define fi first
#define se second
#define pii pair<int, int>
#define pb push_back
#define eb emplace_back
#define task "file"
const int nmax = 1005;
int dp[nmax][nmax][2][2], sz[nmax], d[nmax], vis[nmax], n, m;
int res[nmax];
vector<int> adj[nmax];
void dfs(int u, int p = -1)
{
assert(!vis[u]);
vis[u] = 1;
sz[u] = 1;
dp[u][0][0][0] = 0;
dp[u][1][1][0] = d[u];
for (int v : adj[u])
{
if (v == p)
continue;
dfs(v, u);
for (int i = sz[u]; i >= 0; i--)
{
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... |