# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
253699 | egekabas | Džumbus (COCI19_dzumbus) | C++14 | 557 ms | 19192 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pull;
typedef pair<int, int> pii;
typedef pair<ld, ld> pld;
const ll inf = 1e18+7;
int n, m;
int val[1009];
ll dp[1009][1009][2];
int vis[1009];
int sz[1009];
vector<int> g[1009];
void dfs(int v, int prt){
sz[v] = 1;
vis[v] = 1;
for(int i = 1; i <= n; ++i)
dp[v][i][0] = dp[v][i][1] = inf;
dp[v][0][1] = inf;
for(auto u : g[v])
if(u != prt){
dfs(u, v);
sz[v] += sz[u];
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... |