# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
551604 | QwertyPi | Cats or Dogs (JOI18_catdog) | C++14 | 3078 ms | 15896 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 "catdog.h"
#include <bits/stdc++.h>
#define se second
#define fi first
#define pb push_back
using namespace std;
const int N = 1e5 + 3;
const int inf = 1 << 30;
int n, A[N], p[N], anc[N], d[N];
int dp[N][2];
vector<int> G[N];
struct CD{
void insert(int v, int cd){
}
void erase(int v){
}
} V[N];
void dfs(int v, int par){
for(auto i : G[v]){
if(i != par){
p[i] = v;
anc[i] = (G[v].size() - (v != 1) == 1) ? anc[v] : v;
d[i] = d[v] + 1;
dfs(i, v);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |