# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
237236 | IgorI | Cat in a tree (BOI17_catinatree) | C++17 | 280 ms | 524292 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 200000;
const int K = 2000;
int n, d;
int dp[N][K];
int p[N];
vector<int> graph[N];
void dfs(int v)
{
for (auto u : graph[v]) dfs(u);
dp[v][0] = 1;
for (auto u : graph[v]) dp[v][0] += dp[u][d - 1];
for (int j = d; j > 0; j--)
{
if (2 * j >= d)
{
for (auto u : graph[v])
{
dp[v][j] += dp[u][j - 1];
}
}
else
{
컴파일 시 표준 에러 (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... |